Quote:
Originally Posted by scriptless
Thats why I was wondering if it's possible to read the folder config automatically so you dont have to hardcode the directories. anything with a "level" type in the folder config should show a level that u can warp to. So in theory if you can read it, you can get a list of all directories to test.
Alternatively if I could get the full file path of the file via script that would be even better.
|
There is a way to do this:
PHP Code:
extractFilePath(filename)
For the other thing you wanted: a list of all directories to test, there's a way to do that as well!
You use loadFolder(folder, bool) to load the contents of a folder (starting with levels/) and follow up via fileisfolder(file) to recursively check for and build a directory until you find it.
That'd be disgustingly inefficient compared to extractFilePath(), but you did ask.