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

Function watchMissingFileSystemEntry

test/fixtures/snapshot/typescript.js:7323–7332  ·  view source on GitHub ↗

* Watch the file or directory that is missing * and switch to existing file or directory when the missing filesystem entry is created

()

Source from the content-addressed store, hash-verified

7321 * and switch to existing file or directory when the missing filesystem entry is created
7322 */
7323 function watchMissingFileSystemEntry() {
7324 return watchFile(fileOrDirectory, function (_fileName, eventKind) {
7325 if (eventKind === FileWatcherEventKind.Created && fileSystemEntryExists(fileOrDirectory, entryKind)) {
7326 // Call the callback for current file or directory
7327 // For now it could be callback for the inner directory creation,
7328 // but just return current directory, better than current no-op
7329 invokeCallbackAndUpdateWatcher(watchPresentFileSystemEntry);
7330 }
7331 }, fallbackPollingInterval, fallbackOptions);
7332 }
7333 }
7334 function readFileWorker(fileName, _encoding) {
7335 var buffer;

Callers 1

fsWatchFunction · 0.85

Calls 3

fileSystemEntryExistsFunction · 0.85
watchFileFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…