* Gets stats for the watched path. * @returns {Stats} The stats (with zeroed values if file doesn't exist)
()
| 418 | * @returns {Stats} The stats (with zeroed values if file doesn't exist) |
| 419 | */ |
| 420 | #getStats() { |
| 421 | try { |
| 422 | return this.#vfs.statSync(this.#path, { bigint: this.#bigint }); |
| 423 | } catch { |
| 424 | // Return a zeroed stats object for non-existent files |
| 425 | // This matches Node.js behavior |
| 426 | return this.#createZeroStats(); |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | /** |
| 431 | * Creates a zeroed stats object for non-existent files. |
no test coverage detected