MCPcopy Index your code
hub / github.com/nodejs/node / #buildChildList

Method #buildChildList

lib/internal/vfs/watcher.js:275–289  ·  view source on GitHub ↗

* Builds a list of direct children to track for non-recursive watching. * @param {string} dirPath The directory path

(dirPath)

Source from the content-addressed store, hash-verified

273 * @param {string} dirPath The directory path
274 */
275 #buildChildList(dirPath) {
276 try {
277 const entries = this.#vfs.readdirSync(dirPath);
278 for (const name of entries) {
279 const fullPath = join(dirPath, name);
280 const stats = this.#getStatsFor(fullPath);
281 this.#trackedFiles.set(fullPath, {
282 stats,
283 relativePath: name,
284 });
285 }
286 } catch {
287 // Directory might not exist or be readable
288 }
289 }
290
291 /**
292 * Checks if stats have changed.

Callers 1

constructorMethod · 0.95

Calls 4

#getStatsForMethod · 0.95
joinFunction · 0.50
readdirSyncMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected