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

Function getDirent

lib/internal/fs/glob.js:64–72  ·  view source on GitHub ↗

* @param {string} path * @returns {Promise }

(path)

Source from the content-addressed store, hash-verified

62 * @returns {Promise<DirentFromStats|null>}
63 */
64async function getDirent(path) {
65 let stat;
66 try {
67 stat = await lstat(path);
68 } catch {
69 return null;
70 }
71 return new DirentFromStats(basename(path), stat, dirname(path));
72}
73
74/**
75 * @param {string} path

Callers 4

statMethod · 0.70
#processReadResultMethod · 0.70
handleDirentsFunction · 0.50

Calls 3

basenameFunction · 0.85
dirnameFunction · 0.85
lstatFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…