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

Method readdirSync

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

Source from the content-addressed store, hash-verified

217 return promise;
218 }
219 readdirSync(path) {
220 const cached = this.#readdirCache.get(path);
221 if (cached) {
222 return cached;
223 }
224 let val;
225 try {
226 val = readdirSync(path, { __proto__: null, withFileTypes: true });
227 } catch {
228 val = [];
229 }
230 this.#readdirCache.set(path, val);
231 return val;
232 }
233 add(path, pattern) {
234 let cache = this.#cache.get(path);
235 if (!cache) {

Calls 3

getMethod · 0.65
readdirSyncFunction · 0.50
setMethod · 0.45

Tested by

no test coverage detected