FileSystem.findFiles(var directory, String wildcard, bool recursive)
-
So I'm using this call...or trying to....
sadly it takes a few seconds to return the array of file names....so really it would be better to have this
FileSystem.findFiles(var directory, String wildcard, bool recursive, function(){
})
but meanwhile... how is every one dealing with the waiting game - a timer?
-
No, actually that's a good request, since the scripting engine is not supposed to wait for multiple seconds (which is why all of those things require an asynchronous function call).
I just wasn't aware that this operation might take more time, because I only tested it with small amounts of files, but I can imagine that it will take a bit if you have thousands of files (or if you have a slow USB drive or whatever)
-
@christoph-hart said in FileSystem.findFiles(var directory, String wildcard, bool recursive):
No, actually that's a good request, since the scripting engine is not supposed to wait for multiple seconds (which is why all of those things require an asynchronous function call).
I just wasn't aware that this operation might take more time, because I only tested it with small amounts of files, but I can imagine that it will take a bit if you have thousands of files (or if you have a slow USB drive or whatever)
Yeah - Im testing on a "slow USB drive" to make sure I catch this sort of thing...
-
My vote is for the callback, breaking change is okay with me