* Checks if stats have changed. * @param {Stats} oldStats Previous stats * @param {Stats} newStats Current stats * @returns {boolean} True if stats changed
(oldStats, newStats)
| 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. |