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

Function linkSync

lib/internal/vfs/setup.js:322–327  ·  view source on GitHub ↗
(existingPath, newPath)

Source from the content-addressed store, hash-verified

320 vfsOpVoid(path, (vfs, n) => vfs.lutimesSync(n, atime, mtime)),
321 truncateSync: (path, len) => vfsOpVoid(path, (vfs, n) => vfs.truncateSync(n, len)),
322 linkSync(existingPath, newPath) {
323 return vfsOpVoid(existingPath, (vfs, n) => {
324 checkSameVFS(n, toPathStr(newPath), 'link', vfs);
325 vfs.linkSync(n, resolve(toPathStr(newPath)));
326 });
327 },
328 mkdtempSync(prefix, options) {
329 const result = vfsOp(prefix, (vfs, n) => vfs.mkdtempSync(n));
330 if (result !== undefined && options?.encoding === 'buffer') {

Callers

nothing calls this directly

Calls 5

vfsOpVoidFunction · 0.85
checkSameVFSFunction · 0.85
toPathStrFunction · 0.85
resolveFunction · 0.50
linkSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…