|
|
|
|
Functions
MioScript Reference
|
|
Syntax
| disk.folder.tree(path, variableName, callBackFunction) |
Parameters
| STRING | path | Path to the folder.
| | VAR | variableName | Name of a variable where to store the list of folders.
| | CALLBACK | callBackFunction | Optional. Name of a function to be called each time a folder is found. |
Return value
Description
Builds an array with the list of all the sub-folders found in the specified folder.
The function browses up to 15 levels of sub-folders.
Depending on the number of folders, it can take several minutes to the function to proceed the request.
When specified, the callback function is called each time a folder is found. The number of folders already found is passed as the first parameter of the callback function, and the full path to the folder as the second parameter.
Using the callback function, you can display an information to the user about the progression of the operation.
If you want to retrieve only one level of sub-folders: disk.folder.list |
MioScript Sample Code
event.load
...
disk.folder.list(&path, myArray, myFunction)
for(&ptr, 0, var.array.count(myArray)
log("Folder " + &myArray[&ptr])
for.next
event.end
function.myFunction(&folderCount, &folderPath)
log(&folderCount" folder(s) found")
function.end |
|
|
|