Skip to content

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 InformationDescription
no such file or directoryDirectory does not exist
directory not emptyDirectory is not empty