MCPcopy Index your code
hub / github.com/nodejs/node / #poll

Method #poll

lib/internal/vfs/watcher.js:456–466  ·  view source on GitHub ↗

* Polls for changes.

()

Source from the content-addressed store, hash-verified

454 * Polls for changes.
455 */
456 #poll() {
457 if (this.#closed) return;
458
459 const newStats = this.#getStats();
460
461 if (this.#statsChanged(this.#lastStats, newStats)) {
462 const prevStats = this.#lastStats;
463 this.#lastStats = newStats;
464 this.emit('change', newStats, prevStats);
465 }
466 }
467
468 /**
469 * Checks if stats have changed.

Callers 1

#startPollingMethod · 0.95

Calls 3

#getStatsMethod · 0.95
#statsChangedMethod · 0.95
emitMethod · 0.45

Tested by

no test coverage detected