* @param {VirtualProvider} provider The VFS provider * @param {string} path The path to watch (provider-relative) * @param {object} [options] Options * @param {number} [options.interval] Polling interval in ms (default: 5007) * @param {boolean} [options.persistent] Keep process alive (de
(provider, path, options = kEmptyObject)
| 397 | * @param {boolean} [options.persistent] Keep process alive (default: true) |
| 398 | */ |
| 399 | constructor(provider, path, options = kEmptyObject) { |
| 400 | super(); |
| 401 | |
| 402 | this.#vfs = provider; |
| 403 | this.#path = path; |
| 404 | this.#interval = options.interval ?? 5007; |
| 405 | this.#persistent = options.persistent !== false; |
| 406 | this.#bigint = options.bigint === true; |
| 407 | this.#listeners = new SafeSet(); |
| 408 | |
| 409 | // Get initial stats |
| 410 | this.#lastStats = this.#getStats(); |
| 411 | |
| 412 | // Start polling |
| 413 | this.#startPolling(); |
| 414 | } |
| 415 | |
| 416 | /** |
| 417 | * Gets stats for the watched path. |
nothing calls this directly
no test coverage detected