FsWatcher

File-System~ FsWatcher

An async iterator yielding file-system events.

Constructor

new FsWatcher(path, recursive) → {FsWatcher}

Creates a new FsWatcher instance.

Source:
Parameters:
Name Type Default Description
path String

The path to be monitored for changes.

recursive Boolean false

The watcher will monitor changes in the directory and its subdirectories.

Returns:
Type:
FsWatcher

An instance to monitor file or directory changes.

Methods

close()

Stops watching the file system and closes the watcher resource.

Source: