Interface DirectoryReader

This interface lets a user list files and directories in a directory. If there are no additions to or deletions from a directory between the first and last call to readEntries, and no errors occur, then:

  • A series of calls to readEntries must return each entry in the directory exactly once.
  • Once all entries have been returned, the next call to readEntries must produce an empty array.
  • If not all entries have been returned, the array produced by readEntries must not be empty.
  • The entries produced by readEntries must not include the directory itself ["."] or its parent [".."].

Index

Methods

Methods

public readEntries(successCallback: EntriesCallback, errorCallback?: ErrorCallback)

Read the next block of entries from this directory.

Parameters

  • successCallback: EntriesCallback

    Called once per successful call to readEntries to deliver the next previously-unreported set of Entries in the associated Directory. If all Entries have already been returned from previous invocations of readEntries, successCallback must be called with a zero-length array as an argument.

  • errorCallback?: ErrorCallback optional

    A callback indicating that there was an error reading from the Directory.