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?
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I have a file structure for a program I'm working on that looks like this:
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:
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
Link to post
Share on other sites