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

Function read

benchmark/fs/bench-opendir.js:29–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 const dir = await fs.promises.opendir(fullPath, { bufferSize });
28 await new Promise((resolve, reject) => {
29 function read() {
30 dir.read((err, entry) => {
31 if (err) {
32 reject(err);
33 } else if (entry === null) {
34 resolve(dir.close());
35 } else {
36 counter++;
37 read();
38 }
39 });
40 }
41
42 read();
43 });

Callers 1

mainFunction · 0.70

Calls 4

closeMethod · 0.65
rejectFunction · 0.50
resolveFunction · 0.50
readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…