const nsfw = require('nsfw');
- watchPath: the path that nsfw should watchPath
- eventCallback: callback that will be fired when NSFW has change events
- options
- debounceMS: time in milliseconds to debounce the event callback
- errorCallback: callback to fire in the case of errors
Returns a Promise that resolves to the created NSFW Object.
- events: An array of ChangeEvents
Returns a Promise that resolves when the NSFW object has started watching the path.
Returns a Promise that resolves when NSFW object has halted.
- action: the type of event that occurred
- directory: the location the event took place
- file: the name of the file that was changed (Not available for rename events)
- oldFile: the name of the file before a rename (Only available for rename events)
- newDirectory: the new location of the file (Only available for rename events, only useful on linux)
- newFile: the name of the file after a rename (Only available for rename events)
Is found on the nsfw module as a property. Used to parse event callback.
- CREATED
- DELETED
- MODIFIED
- RENAMED