Skip to content

$fn.getFolderNames(path)

Obtains a list of folder names in a specified directory path. "asynchronous"
This function was added in v4.2.0.

Arguments

NameTypeDescription
pathstringPath of the directory to be retrieved

Return value

TypeDescription
array of stringList of folder names in target directory

Sample

try {
const folders = await $fn.getFolderNames('/');
} catch (err) {
console.log("Error", err);
}