$fn.getFileNames(path)
Obtains a list of file names in a specified directory path. "asynchronous"
Arguments
Name | Type | Description |
---|---|---|
path | string | Path of the directory to be retrieved |
Return value
Type | Description |
---|---|
array of string | List of file names in target directory |
Sample
try { const files = await $fn.getFileNames('/folder1');} catch (err) { console.log("Error", err);}