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

Function openVirtualFd

lib/internal/vfs/fd.js:56–61  ·  view source on GitHub ↗

* Opens a virtual file and returns its file descriptor. * @param {VirtualFileHandle} entry The virtual file handle * @returns {number} The file descriptor

(entry)

Source from the content-addressed store, hash-verified

54 * @returns {number} The file descriptor
55 */
56function openVirtualFd(entry) {
57 const fd = VFS_FD_MASK | nextFd++;
58 const vfd = new VirtualFD(fd, entry);
59 openFDs.set(fd, vfd);
60 return fd;
61}
62
63/**
64 * Gets a VirtualFD by its file descriptor number.

Callers 2

openSyncMethod · 0.85
openMethod · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected