MCPcopy Create free account
hub / github.com/nodejs/node / setDirectoryWatcher

Function setDirectoryWatcher

test/fixtures/snapshot/typescript.js:121655–121664  ·  view source on GitHub ↗
(dir, dirPath, nonRecursive)

Source from the content-addressed store, hash-verified

121653 }
121654 }
121655 function setDirectoryWatcher(dir, dirPath, nonRecursive) {
121656 var dirWatcher = directoryWatchesOfFailedLookups.get(dirPath);
121657 if (dirWatcher) {
121658 ts.Debug.assert(!!nonRecursive === !!dirWatcher.nonRecursive);
121659 dirWatcher.refCount++;
121660 }
121661 else {
121662 directoryWatchesOfFailedLookups.set(dirPath, { watcher: createDirectoryWatcher(dir, dirPath, nonRecursive), refCount: 1, nonRecursive: nonRecursive });
121663 }
121664 }
121665 function stopWatchFailedLookupLocationOfResolution(resolution, filePath, getResolutionWithResolvedFileName) {
121666 ts.unorderedRemoveItem(ts.Debug.checkDefined(resolution.files), filePath);
121667 resolution.refCount--;

Callers 1

Calls 4

createDirectoryWatcherFunction · 0.85
assertMethod · 0.80
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected