Modules (188)

WatchedRoot

Description

Dependencies

This module has no dependencies

Classes

Constructor

WatchedRoot

Represents file or directory structure watched by the FileSystem. If the entry is a directory, all children (that pass the supplied filter function) are also watched. A WatchedRoot object begins and ends its life in the INACTIVE state. While in the process of starting up watchers, the WatchedRoot is in the STARTING state. When watchers are ready, the WatchedRoot enters the ACTIVE state.

See the FileSystem class for more details.

entry File,Directory
filter function(string,string):boolean
filterGlobs Array<string>
    function WatchedRoot(entry, filter, filterGlobs) {
        this.entry = entry;
        this.filter = filter;
        this.filterGlobs = filterGlobs;
    }

    // Status constants
    WatchedRoot.INACTIVE = 0;
    WatchedRoot.STARTING = 1;
    WatchedRoot.ACTIVE = 2;

Properties

entry

Type
File, Directory
    WatchedRoot.prototype.entry = null;

filter

Type
function(string, string):boolean
    WatchedRoot.prototype.filter = null;

filterGlobs

Type
Array<string>
    WatchedRoot.prototype.filterGlobs = null;

status

Type
number
    WatchedRoot.prototype.status = WatchedRoot.INACTIVE;


    // Export this class
    module.exports = WatchedRoot;
});