I need to read the list of files (with given extension) from a folder provided by the user.
I've tried using the filesystem API, but it's not working form me.
When I do fs.getCurrentPath() I get the folder where the script editor is located. Weird.
Here it is a stripped example of what I'm doing:
I guess I'm not using the filesystem correctly, or maybe changing the folder is not allowed?
I've tried using the filesystem API, but it's not working form me.
When I do fs.getCurrentPath() I get the folder where the script editor is located. Weird.
Here it is a stripped example of what I'm doing:
Code:
string myFolder= 'D:/music/dev/myfolder';filesystem fs;bool ok = fs.changeCurrentPath(myFolder);if (ok) {print("Changed path!"); array<string> files = fs.getFiles();for (uint n=0; n < files.length; n++) {print(files[n]);}}
Statistics: Posted by giohappy — Sat Nov 23, 2024 2:07 pm — Replies 0 — Views 4