FileSystemManager.access
JS
FileSystemManager.access(Object object)Determines whether a file/directory exists
Parameters
- Object object: Input parameters. See the table below for details.
object properties:
| Property | Value Type | Required | Description |
|---|---|---|---|
| path | string | Yes | Path of the file/directory to check for existence |
| success | function | No | Callback for when the file exists |
| fail | function | No | Callback for when the file does not exist |
| complete | function | No | Callback for when the call ends |
Parameters of the fail callback
- Object res: Returns error information
res properties:
| Property | Value Type | Description |
|---|---|---|
| errMsg | string | Error information |
Valid values of errMsg:
| Error Information | Description |
|---|---|
| fail no such file or directory | File/directory does not exist |
