Drakath Posted August 22, 2014 Posted August 22, 2014 Is there a way to loop through a folder to see its files? Let's say I have a bunch of images in a folder and I want to get the name of each image.
xXMADEXx Posted August 22, 2014 Posted August 22, 2014 Method 1 (which i recommend) would be to put all of the file names into a table, and loop the table to check if the file exists. Another method (not sure if it would work) would be to use scanDir in the FileSystem module.
ixjf Posted August 22, 2014 Posted August 22, 2014 You can use midnightStar's filesystem module. Install it (follow the exact steps on the module's page), call createFilesystemInterface, create a translator with root in your resource's directory and use scanDir, scanDirEx or getFiles, depending on what you want.
Drakath Posted August 23, 2014 Author Posted August 23, 2014 Hmm. I rather store all the files in a table. Thanks for the help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now