Skip to content

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:

PropertyValue TypeRequiredDescription
pathstringYesPath of the file/directory to check for existence
successfunctionNoCallback for when the file exists
failfunctionNoCallback for when the file does not exist
completefunctionNoCallback for when the call ends

Parameters of the fail callback

  • Object res: Returns error information

res properties:

PropertyValue TypeDescription
errMsgstringError information

Valid values of errMsg:

Error InformationDescription
fail no such file or directoryFile/directory does not exist