NeXTreme Posted March 17, 2012 Posted March 17, 2012 (edited) It would be really helpful if we had a function to retreive a list of all files in a resource's directory. We already have a bunch of functions for handling files. I was surprised there's no function that would list all the files, really. An example use would be files = {} files = fileList() -- list all files in the current resource's running directory files = fileList("/client") -- list all files in the current resource's subdirectory "client" (ex. joinquit/client/) Edited March 25, 2012 by Guest
arezu Posted March 17, 2012 Posted March 17, 2012 (edited) You can do it with php, but all servers doesn't use php. And it would be alot easier and faster if there were a function like this. Edited March 18, 2012 by Guest
NeXTreme Posted March 18, 2012 Author Posted March 18, 2012 I can't use PHP to scan client-side directories.
50p Posted March 25, 2012 Posted March 25, 2012 I remember I wrote a patch which had a function getResourceFiles (it was both, server and client side) but it was never committed. It's not hard to write that function and I'm surprised it hasn't been added yet.
NeXTreme Posted April 4, 2012 Author Posted April 4, 2012 getResourceFiles sounds like it gets files that are included in the meta.xml only (which can also be accomplished via some XML scripting). The function should list all files in the directory of the resource it's runnning from. However, it must not list files from other resources, since that can be a security issue (like, reading autologin information from other servers).
Cassandra Posted April 5, 2012 Posted April 5, 2012 I agree with this suggestion and I am surprised that it hasn't been implemented yet.
Recommended Posts