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

Function openAsBlob

lib/internal/vfs/setup.js:336–348  ·  view source on GitHub ↗
(path, options)

Source from the content-addressed store, hash-verified

334 },
335 opendirSync: (path, options) => vfsOp(path, (vfs, n) => vfs.opendirSync(n, options)),
336 openAsBlob(path, options) {
337 const pathStr = toPathStr(path);
338 if (pathStr !== null) {
339 const normalized = resolve(pathStr);
340 for (let i = 0; i < activeVFSList.length; i++) {
341 const vfs = activeVFSList[i];
342 if (vfs.shouldHandle(normalized) && vfs.existsSync(normalized)) {
343 return vfs.openAsBlob(normalized, options);
344 }
345 }
346 }
347 return undefined;
348 },
349
350 // ==================== Sync FD-based ops ====================
351

Callers

nothing calls this directly

Calls 5

toPathStrFunction · 0.85
shouldHandleMethod · 0.80
openAsBlobMethod · 0.80
resolveFunction · 0.50
existsSyncMethod · 0.45

Tested by

no test coverage detected