* Determines the event type based on stats change. * @param {Stats|null} oldStats Previous stats * @param {Stats|null} newStats Current stats * @returns {string} 'rename' or 'change'
(oldStats, newStats)
| 323 | * @returns {string} 'rename' or 'change' |
| 324 | */ |
| 325 | #determineEventType(oldStats, newStats) { |
| 326 | // File was created or deleted |
| 327 | if ((oldStats === null) !== (newStats === null)) { |
| 328 | return 'rename'; |
| 329 | } |
| 330 | // Content changed |
| 331 | return 'change'; |
| 332 | } |
| 333 | |
| 334 | /** |
| 335 | * Closes the watcher and stops polling. |
no outgoing calls
no test coverage detected