harryh Posted April 4, 2017 Share Posted April 4, 2017 Would it be possible for me to check what files are in a folder and save them in a table For example: local files = {} fileCheck("/mods") returns all files in folder tableinsert(files, server.lua) tableinsert(files,client.lua) tableinsert(files,text.dff) tableinsert(files,meta.xml) tableinsert(files,color.txd) Link to comment
harryh Posted April 4, 2017 Author Share Posted April 4, 2017 6 minutes ago, 3laa33 said: fileExists ( string filePath ) I mean without needing to put a file path like. like its I type fileExists(/mods/*) will it return file names for all in directory Link to comment
3aGl3 Posted April 4, 2017 Share Posted April 4, 2017 I don't think that's possible, at least I can't find a function and also have never seen it done. If you want to save some sort of dynamic files you will either have to make a list of them e.g. create a files.txt/xml and add a file name every time you create a file. Or have the names in some sort of relation, e.g map name, player account, etc. Whichever fits better for what you are planning. Link to comment
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