listDirectory(dir_path)
Class: SwingUI.
Description:
Reads the contents of a directory synchronously and returns an Array of files and directories.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
string |
Path to the directory to read |
Returns:
- Returns an Array of filenames/directory names in the directory.
Type: Array.<string>
Throws:
- Error: When the directory path is invalid.
- Error: When the directory is not found.
- Error: When specified path is not a directory.
- Error: When access is denied.
- Error: When failed to read the directory.
