This repository has been archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Watch
Oliver Foster edited this page Jun 22, 2017
·
7 revisions
This class integrates the Globs
and Watches
classes. It manages the file system attachments for the associated Globs
object.
Watch {
constructor(Globs:globs, options),
changes, // Hash of location Stat object which have changed
globs, // Globs object passed into constructor
options, // Options object passed into constructor
attach(), // Attach file system listeners
change(), // Calculate changes
trigger(), // Trigger queued changes
cancel(), // Calculating changes or triggering queued changes
pause(), // Stop listening to and triggering file system changes
play(), // Restart listening to, check and trigger file system changes
detach(), // Detach file system listeners
destroy() // Detach file system listeners, release globs and options
}
globs = Globs
options = Used to calculate the callback Stats object
Watch {
constructor({
files: true, // Include files in output
dirs: true, // Include directories in output
includeParentDirs: false, // Always output parent directory for matches
interval: 2000 // The time to wait after the last file change before triggering a change callback
})
}