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

Function readlinkSync

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

Source from the content-addressed store, hash-verified

259 return undefined;
260 },
261 readlinkSync(path, options) {
262 const pathStr = toPathStr(path);
263 if (pathStr === null) return undefined;
264 const normalized = resolve(pathStr);
265 for (let i = 0; i < activeVFSList.length; i++) {
266 const vfs = activeVFSList[i];
267 if (vfs.shouldHandle(normalized)) {
268 const result = vfs.readlinkSync(normalized, options);
269 if (options?.encoding === 'buffer') return Buffer.from(result);
270 return result;
271 }
272 }
273 return undefined;
274 },
275 statfsSync(path, options) {
276 const pathStr = toPathStr(path);
277 if (pathStr !== null && findVFSForPath(pathStr) !== null) {

Callers 1

onLinkFunction · 0.50

Calls 5

toPathStrFunction · 0.85
shouldHandleMethod · 0.80
resolveFunction · 0.50
readlinkSyncMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…