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

Method readdir

lib/internal/fs/glob.js:210–218  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

208 this.#statsCache.set(path, val);
209 }
210 async readdir(path) {
211 const cached = this.#readdirCache.get(path);
212 if (cached) {
213 return cached;
214 }
215 const promise = PromisePrototypeThen(readdir(path, { __proto__: null, withFileTypes: true }), null, () => []);
216 this.#readdirCache.set(path, promise);
217 return promise;
218 }
219 readdirSync(path) {
220 const cached = this.#readdirCache.get(path);
221 if (cached) {

Callers 15

readFunction · 0.45
readdirFunction · 0.45
readdirSyncFunction · 0.45
#iterateSubpatternsMethod · 0.45
readdirRecursiveFunction · 0.45
readdirFunction · 0.45
mainFunction · 0.45
readdirFunction · 0.45

Calls 3

readdirFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by 1

testFunction · 0.36