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

Function lstatSync

lib/internal/vfs/setup.js:215–231  ·  view source on GitHub ↗
(path, options)

Source from the content-addressed store, hash-verified

213 return result;
214 },
215 lstatSync(path, options) {
216 const pathStr = toPathStr(path);
217 if (pathStr === null) return undefined;
218 const normalized = resolve(pathStr);
219 for (let i = 0; i < activeVFSList.length; i++) {
220 const vfs = activeVFSList[i];
221 if (vfs.shouldHandle(normalized)) {
222 try {
223 return vfs.lstatSync(normalized, options);
224 } catch (e) {
225 if (e?.code === 'ENOENT' && options?.throwIfNoEntry === false) return undefined;
226 throw e;
227 }
228 }
229 }
230 return undefined;
231 },
232 statSync(path, options) {
233 try {
234 return vfsRead(path, 'stat', (vfs, n) => vfs.statSync(n, options));

Callers 1

getDirentSyncFunction · 0.50

Calls 4

toPathStrFunction · 0.85
shouldHandleMethod · 0.80
resolveFunction · 0.50
lstatSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…