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

Function link

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

Source from the content-addressed store, hash-verified

616 truncate: (path, len) =>
617 vfsOp(path, (vfs, n) => vfs.promises.truncate(n, len).then(() => true)),
618 link(existingPath, newPath) {
619 return vfsOp(existingPath, (vfs, n) => {
620 checkSameVFS(n, toPathStr(newPath), 'link', vfs);
621 return vfs.promises.link(n, resolve(toPathStr(newPath))).then(() => true);
622 });
623 },
624 mkdtemp(prefix, options) {
625 const promise = vfsOp(prefix, (vfs, n) => vfs.promises.mkdtemp(n));
626 if (promise !== undefined && options?.encoding === 'buffer') {

Callers

nothing calls this directly

Calls 6

vfsOpFunction · 0.85
checkSameVFSFunction · 0.85
toPathStrFunction · 0.85
resolveFunction · 0.50
thenMethod · 0.45
linkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…