datasource.files
Lists the files in a directory.
js
datasource.files(directoryName)Parameters
| Parameter | Type | Description |
|---|---|---|
directoryName | string | The 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/");