Skip to content

$fn.getFileNames(path)

Obtains a list of file names in a specified directory path. "asynchronous"

Arguments

NameTypeDescription
pathstringPath of the directory to be retrieved

Return value

TypeDescription
array of stringList of file names in target directory

Sample

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