interface FSWatcher
extends EventEmitter
Methods Jump to heading
Jump to headingclose(): voidStop watching for changes on the given fs.FSWatcher. Once stopped, the fs.FSWatcher object is no longer usable.
Jump to headingref(): thisWhen 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.
Jump to headingunref(): thisWhen 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,): thisevents.EventEmitter
- change
- close
- error
Jump to headingaddListener(event: "change",listener: (eventType: string,filename: string | Buffer,) => void,): thisJump to headingaddListener(event: "close",listener: () => void,): thisJump to headingaddListener(event: "error",listener: (error: Error) => void,): thisJump to headingon(event: string,listener: (...args: any[]) => void,): thisJump to headingon(event: "change",listener: (eventType: string,filename: string | Buffer,) => void,): thisJump to headingon(event: "close",listener: () => void,): thisJump to headingon(event: "error",listener: (error: Error) => void,): thisJump to headingonce(event: string,listener: (...args: any[]) => void,): thisJump to headingonce(event: "change",listener: (eventType: string,filename: string | Buffer,) => void,): thisJump to headingonce(event: "close",listener: () => void,): thisJump to headingonce(event: "error",listener: (error: Error) => void,): thisJump to headingprependListener(event: string,listener: (...args: any[]) => void,): thisJump to headingprependListener(event: "change",listener: (eventType: string,filename: string | Buffer,) => void,): thisJump to headingprependListener(event: "close",listener: () => void,): thisJump to headingprependListener(event: "error",listener: (error: Error) => void,): thisJump to headingprependOnceListener(event: string,listener: (...args: any[]) => void,): thisJump to headingprependOnceListener(event: "change",listener: (eventType: string,filename: string | Buffer,) => void,): thisJump to headingprependOnceListener(event: "close",listener: () => void,): thisJump to headingprependOnceListener(event: "error",listener: (error: Error) => void,): this