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

Method #statsChanged

lib/internal/vfs/watcher.js:474–486  ·  view source on GitHub ↗

* Checks if stats have changed. * @param {Stats} oldStats Previous stats * @param {Stats} newStats Current stats * @returns {boolean} True if stats changed

(oldStats, newStats)

Source from the content-addressed store, hash-verified

472 * @returns {boolean} True if stats changed
473 */
474 #statsChanged(oldStats, newStats) {
475 // Compare mtime and ctime
476 if (oldStats.mtimeMs !== newStats.mtimeMs) {
477 return true;
478 }
479 if (oldStats.ctimeMs !== newStats.ctimeMs) {
480 return true;
481 }
482 if (oldStats.size !== newStats.size) {
483 return true;
484 }
485 return false;
486 }
487
488 /**
489 * Adds a listener for the given event.

Callers 1

#pollMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected