MCPcopy Index your code
hub / github.com/nodejs/node / invokeCallbackAndUpdateWatcher

Function invokeCallbackAndUpdateWatcher

test/fixtures/snapshot/typescript.js:7255–7264  ·  view source on GitHub ↗

* Invoke the callback with rename and update the watcher if not closed * @param createWatcher

(createWatcher)

Source from the content-addressed store, hash-verified

7253 * @param createWatcher
7254 */
7255 function invokeCallbackAndUpdateWatcher(createWatcher) {
7256 sysLog("sysLog:: ".concat(fileOrDirectory, ":: Changing watcher to ").concat(createWatcher === watchPresentFileSystemEntry ? "Present" : "Missing", "FileSystemEntryWatcher"));
7257 // Call the callback for current directory
7258 callback("rename", "");
7259 // If watcher is not closed, update it
7260 if (watcher) {
7261 watcher.close();
7262 watcher = createWatcher();
7263 }
7264 }
7265 /**
7266 * Watch the file or directory that is currently present
7267 * and when the watched file or directory is deleted, switch to missing file system entry watcher

Calls 4

sysLogFunction · 0.85
concatMethod · 0.80
callbackFunction · 0.70
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…