Skip to content

watchFile

watchFile(this, path, listener): StatWatcher

Defined in: src/node/async.ts:601

Watch for changes on a file. The listener is called with the current and previous Stats whenever they differ. Every call for the same file returns the same StatWatcher.

unknown

PathLike

(curr, prev) => void

StatWatcher

watchFile(this, path, options, listener): StatWatcher

Defined in: src/node/async.ts:602

Watch for changes on a file. The listener is called with the current and previous Stats whenever they differ. Every call for the same file returns the same StatWatcher.

unknown

PathLike

WatchFileOptions & object

bigint, persistent, and interval (in milliseconds)

(curr, prev) => void

StatWatcher

watchFile(this, path, options, listener): StatWatcher

Defined in: src/node/async.ts:608

Watch for changes on a file. The listener is called with the current and previous Stats whenever they differ. Every call for the same file returns the same StatWatcher.

unknown

PathLike

WatchFileOptions & object

bigint, persistent, and interval (in milliseconds)

(curr, prev) => void

StatWatcher