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

Function promisesOpen

lib/internal/vfs/setup.js:641–652  ·  view source on GitHub ↗
(path, flags, mode)

Source from the content-addressed store, hash-verified

639 return vfsOp(path, async (vfs, n) => vfs.openSync(n, flags, mode));
640 },
641 promisesOpen(path, flags, mode) {
642 const pathStr = toPathStr(path);
643 if (pathStr !== null) {
644 const r = findVFSForPath(pathStr);
645 if (r !== null) {
646 const fd = r.vfs.openSync(r.normalized, flags, mode);
647 const vfd = getVirtualFd(fd);
648 return PromiseResolve(vfd.entry);
649 }
650 }
651 return undefined;
652 },
653 lchmod: (path, mode) =>
654 vfsOp(path, (vfs, n) => vfs.promises.lchmod(n, mode).then(() => true)),
655 };

Callers

nothing calls this directly

Calls 4

toPathStrFunction · 0.85
findVFSForPathFunction · 0.85
getVirtualFdFunction · 0.85
openSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…