OptionalencodingOptionalignoreOptionalmaxSpecifies the number of events to queue between iterations of the AsyncIterator.
OptionaloverflowBehavior when more events are queued than maxQueue allows. 'ignore' means
overflow events are dropped and a warning is emitted, while 'error' means
the iterator throws an ERR_FS_WATCH_QUEUE_OVERFLOW error. 'throw' is
accepted as an alias of 'error' (the Node.js docs use 'throw' while its
implementation validates 'error').
OptionalpersistentIndicates whether the process should continue to run as long as files are being watched. Default: true.
OptionalrecursiveIndicates whether all subdirectories should be watched, or only the current directory. This applies when a directory is specified, and only on supported platforms (See caveats). Default: false.
OptionalsignalAllows closing the watcher with an AbortSignal.
OptionalthrowWhether to throw if the watched path does not exist. When false, a
watcher that was never started is returned instead. Default: true.
Pattern(s) for event filenames to ignore. Strings are glob patterns, a RegExp is tested against the filename, and a function receives the filename and returns
trueto ignore it. An array may mix all three.