Create observable file system scopes using observ pattern.
npm install observ-fsobserv-fs
===
Create observable file system scopes using observ/unidirectional pattern.
``bash`
$ npm install observ-fs
`js`
var ObservDirectory = require('observ-fs/directory')
Create a directory observer. All arguments are optional. The directory will not be created if it doesn't exist, instead null' will be emitted as value.
Emits a list of all files and sub-directories in path whenever any child changes.
Change the target of the directory observer. cb called after refresh.
Reload children and emit result (also calls cb with directory instance on load).
Stop watching.
Get notified by callback when the directory is closed.
``js`
var ObservFile = require('observ-fs/file')
Create a file observer. Unlike ObservDirectory, the path cannot be changed later but the file will be created if it doesn't exist.
Any changes made to the file will be emitted.
Update the file with data specified.
Reload the file from disk and emit the data.
Delete the file stored on disk and close all other watchers.
Close the watcher.
Get notified by callback` when the file is closed.