$fn.getFolderNames(path)
Obtains a list of folder names in a specified directory path. "asynchronous"
This function was added in v4.2.0.
Arguments
| Name | Type | Description |
|---|---|---|
| path | string | Path of the directory to be retrieved |
Return value
| Type | Description |
|---|---|
| array of string | List of folder names in target directory |
Sample
try { const folders = await $fn.getFolderNames('/');} catch (err) { console.log("Error", err);}