Skip to content

datasource.files ​

Lists the files in a directory.

js
datasource.files(directoryName)

Parameters ​

ParameterTypeDescription
directoryNamestringThe path of the directory.

Returns ​

string[]

The names of the files in the directory, not including sub-directories. Each is just the file's name, not its full path. Empty when the directory doesn't exist.

Examples ​

js
const fileList = datasource.files("my_directory/");