Skip to content

FileSystemManager.readdir ​

JS
    FileSystemManager.readdir(Object object)

Reads the list of files in a directory

Parameters

  • Object object: Input parameters. See the table below for details.

object properties:

PropertyValue TypeRequiredDescription
dirPathstringYesPath of the directory to read
successfunctionNoCallback for a successful call
failfunctionNoCallback for a failed call
completefunctionNoCallback for when the call ends

Parameters of the success callback

  • Object res: Returns information about the specified directory

res properties:

PropertyValue TypeDescription
filesArray.<string>Array of file names in the specified directory