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

Function watch

lib/internal/vfs/setup.js:466–481  ·  view source on GitHub ↗
(filename, options, listener)

Source from the content-addressed store, hash-verified

464 // ==================== Watch ops ====================
465
466 watch(filename, options, listener) {
467 if (typeof options === 'function') {
468 listener = options;
469 options = kEmptyObject;
470 } else if (options != null) {
471 validateObject(options, 'options');
472 } else {
473 options = kEmptyObject;
474 }
475 const pathStr = toPathStr(filename);
476 if (pathStr !== null) {
477 const r = findVFSForPath(pathStr);
478 if (r !== null) return r.vfs.watch(pathStr, options, listener);
479 }
480 return undefined;
481 },
482
483 // ==================== Async path-based ops ====================
484

Callers 1

watchPathMethod · 0.50

Calls 3

toPathStrFunction · 0.85
findVFSForPathFunction · 0.85
watchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…