watchFile
Call Signature
Section titled “Call Signature”watchFile(
this,path,listener):void
Defined in: src/node/async.ts:604
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.
Parameters
Section titled “Parameters”unknown
PathLike
The path to the file to watch.
listener
Section titled “listener”(curr, prev) => void
The callback listener to be called when the file changes.
Returns
Section titled “Returns”void
Call Signature
Section titled “Call Signature”watchFile(
this,path,options,listener):void
Defined in: src/node/async.ts:605
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.
Parameters
Section titled “Parameters”unknown
PathLike
The path to the file to watch.
options
Section titled “options”Optional options object specifying persistent and interval.
interval?
Section titled “interval?”number
persistent?
Section titled “persistent?”boolean
listener
Section titled “listener”(curr, prev) => void
The callback listener to be called when the file changes.
Returns
Section titled “Returns”void