MCPcopy
hub / github.com/advplyr/audiobookshelf / onFileRename

Method onFileRename

server/Watcher.js:223–229  ·  view source on GitHub ↗

* Watcher detected file renamed * * @param {string} libraryId * @param {string} path

(libraryId, pathFrom, pathTo)

Source from the content-addressed store, hash-verified

221 * @param {string} path
222 */
223 onFileRename(libraryId, pathFrom, pathTo) {
224 if (this.checkShouldIgnorePath(pathTo)) {
225 return
226 }
227 Logger.debug(`[Watcher] Rename ${pathFrom} => ${pathTo}`)
228 this.addFileUpdate(libraryId, pathTo, 'renamed')
229 }
230
231 /**
232 * Get mtimeMs from an added file every 3 seconds until it is no longer changing

Callers 2

buildLibraryWatcherMethod · 0.95
updateWatchedPathMethod · 0.80

Calls 3

checkShouldIgnorePathMethod · 0.95
addFileUpdateMethod · 0.95
debugMethod · 0.65

Tested by

no test coverage detected