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

Function tryGetReadFileBuffer

lib/fs.js:461–471  ·  view source on GitHub ↗
(options, size, fd, isUserFd)

Source from the content-addressed store, hash-verified

459}
460
461function tryGetReadFileBuffer(options, size, fd, isUserFd) {
462 let threw = true;
463 let buffer;
464 try {
465 buffer = getReadFileBuffer(options, size);
466 threw = false;
467 } finally {
468 if (threw && !isUserFd) fs.closeSync(fd);
469 }
470 return buffer;
471}
472
473function tryReadSync(fd, isUserFd, buffer, pos, len) {
474 let threw = true;

Callers 1

readFileSyncFunction · 0.85

Calls 1

closeSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…