Skip to main content

FSWatcher

interface FSWatcher
extends EventEmitter

Stop watching for changes on the given fs.FSWatcher. Once stopped, the fs.FSWatcher object is no longer usable.

When called, requests that the Node.js event loop not exit so long as the fs.FSWatcher is active. Calling watcher.ref() multiple times will have no effect.

By default, all fs.FSWatcher objects are "ref'ed", making it normally unnecessary to call watcher.ref() unless watcher.unref() had been called previously.

When called, the active fs.FSWatcher object will not require the Node.js event loop to remain active. If there is no other activity keeping the event loop running, the process may exit before the fs.FSWatcher object's callback is invoked. Calling watcher.unref() multiple times will have no effect.

Jump to headingaddListener(
event: string,
listener: (...args: any[]) => void,
): this

events.EventEmitter

  1. change
  2. close
  3. error
Jump to headingaddListener(
event: "change",
listener: (
eventType: string,
filename: string | Buffer,
) => void
,
): this
Jump to headingaddListener(
event: "close",
listener: () => void,
): this
Jump to headingaddListener(
event: "error",
listener: (error: Error) => void,
): this
Jump to headingon(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingon(
event: "change",
listener: (
eventType: string,
filename: string | Buffer,
) => void
,
): this
Jump to headingon(
event: "close",
listener: () => void,
): this
Jump to headingon(
event: "error",
listener: (error: Error) => void,
): this
Jump to headingonce(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingonce(
event: "change",
listener: (
eventType: string,
filename: string | Buffer,
) => void
,
): this
Jump to headingonce(
event: "close",
listener: () => void,
): this
Jump to headingonce(
event: "error",
listener: (error: Error) => void,
): this
Jump to headingprependListener(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingprependListener(
event: "change",
listener: (
eventType: string,
filename: string | Buffer,
) => void
,
): this
Jump to headingprependListener(
event: "close",
listener: () => void,
): this
Jump to headingprependListener(
event: "error",
listener: (error: Error) => void,
): this
Jump to headingprependOnceListener(
event: string,
listener: (...args: any[]) => void,
): this
Jump to headingprependOnceListener(
event: "change",
listener: (
eventType: string,
filename: string | Buffer,
) => void
,
): this
Jump to headingprependOnceListener(
event: "close",
listener: () => void,
): this
Jump to headingprependOnceListener(
event: "error",
listener: (error: Error) => void,
): this
Back to top