Directory

Description

Classes Summary

Classes

Constructor

Directory

fullPath string
The full path for this Directory.
fileSystem FileSystem
The file system associated with this Directory.
Properties
Methods

Properties

_contents

The contents of this directory. This "private" property is used by FileSystem.

_contentsStats

The stats for the contents of this directory, such that this._contentsStats[i] corresponds to this._contents[i].

_contentsStatsErrors

The stats errors for the contents of this directory.

Methods

Private

_clearCachedData

Clear any cached data for this directory. By default, we clear the contents of immediate children as well, because in some cases file watchers fail provide precise change notifications. (Sometimes, like after a "git checkout", they just report that some directory has changed when in fact many of the file within the directory have changed.

preserveImmediateChildren optional boolean

create

Create a directory

callback optional function (?string, FileSystemStats=)
Callback resolved with a FileSystemError string or the stat object for the created directory.

getContents

Read the contents of a Directory.

directory Directory
Directory whose contents you want to get
callback function (?string,Array.<FileSystemEntry>=,Array.<FileSystemStats>=,Object.<string,string>=)
Callback that is passed an error code or the stat-able contents of the directory along with the stats for these entries and a fullPath-to-FileSystemError string map of unstat-able entries and their stat errors. If there are no stat errors then the last parameter shall remain undefined.