Watch for changes on a file. The callback listener will be called each time the file is accessed.
The options argument may be omitted. If provided, it should be an object with a persistent boolean and an interval number specifying the polling interval in milliseconds.
When a change is detected, the listener callback is called with the current and previous Stats objects.
Watch for changes on a file. The callback listener will be called each time the file is accessed.
The
optionsargument may be omitted. If provided, it should be an object with apersistentboolean and anintervalnumber specifying the polling interval in milliseconds.When a change is detected, the
listenercallback is called with the current and previousStatsobjects.