MCPcopy
hub / github.com/webpack/webpack / doStat

Function doStat

lib/util/fs.js:715–729  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

713 });
714 };
715 const doStat = () => {
716 if ("lstat" in fs) {
717 return /** @type {NonNullable<InputFileSystem["lstat"]>} */ (fs.lstat)(
718 p,
719 (err, stats) => {
720 if (err) return callback(err);
721 if (/** @type {IStats} */ (stats).isSymbolicLink()) {
722 return doReadLink();
723 }
724 callback(null, stats);
725 }
726 );
727 }
728 return fs.stat(p, callback);
729 };
730 if ("lstat" in fs) return doStat();
731 doReadLink();
732};

Callers 2

doReadLinkFunction · 0.70
lstatReadlinkAbsoluteFunction · 0.70

Calls 2

doReadLinkFunction · 0.85
callbackFunction · 0.50

Tested by

no test coverage detected