FileSystemManager.readdirSync
JS
FileSystemManager.readdirSync(string dirPath)Reads a directory
The synchronous version of FileSystemManager.readdir
Parameters
- string dirPath: Path of the directory to delete
Return Value
- Array files: Array of file names in the specified directory
Parameters for caught exceptions
- string error: Returns error information. See the figure below for valid values.
Valid values of error:
| Error Information | Description |
|---|---|
| no such file or directory | Directory does not exist |
| directory not empty | Directory is not empty |
