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

Function statfs

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

Source from the content-addressed store, hash-verified

568 lutimes: (path, atime, mtime) =>
569 vfsOp(path, (vfs, n) => vfs.promises.lutimes(n, atime, mtime).then(() => true)),
570 statfs(path, options) {
571 const pathStr = toPathStr(path);
572 if (pathStr !== null && findVFSForPath(pathStr) !== null) {
573 if (options?.bigint) {
574 return {
575 __proto__: null,
576 type: 0n, bsize: 4096n, blocks: 0n,
577 bfree: 0n, bavail: 0n, files: 0n, ffree: 0n,
578 };
579 }
580 return {
581 __proto__: null,
582 type: 0, bsize: 4096, blocks: 0,
583 bfree: 0, bavail: 0, files: 0, ffree: 0,
584 };
585 }
586 return undefined;
587 },
588 writeFile(path, data, options) {
589 return vfsOp(path, (vfs, n) => vfs.promises.writeFile(n, data, options).then(() => true));
590 },

Callers

nothing calls this directly

Calls 2

toPathStrFunction · 0.85
findVFSForPathFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…