- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Henness
-
Content Count
2 -
Joined
-
Last visited
Posts posted by Henness
-
-
I have a file structure for a program I'm working on that looks like this:
Main.lua Addons folder -API.lua -Addon A.lua -Addon B.lua -Addon Z.lua
My problem is all the information I can find about listing files in a directory is inconsistent, and I don't quite under stand file path format in lua. Some people say its easier with lua filesystem but is that even available in open computers? The way I have been thinking about doing it would be something like this:
for dir in io.popen([[dir "PATHHERESOMEHOW" /b]]):lines() do require(dir) end
First will something like this even work is io.popen even available to use in open computers? Seconded what whould I have to put in the path area to make it work? And Third what does the modifiers after the path mean I saw some use /b and some use /a /b?
I have another question that isn't really related to the above. If I require() the A B and Z files in the API file would the A B and Z files be usable in the Main file if I requre() the API file?
Thanks in advance,
Henness
require() all files in a folder?
in Programming
Posted
Thank you this is exactly what I was looking for!