### Version main ### Platform ```text All ``` ### Subsystem vfs ### What steps will reproduce the bug? ```js import fs from 'node:fs/promises'; import path from 'node:path'; import vfs from 'node:vfs'; const virtualFs = vfs.create(); const mountPoint = virtualFs.mount(); try { console.log(await fs.statfs(path.join(mountPoint, 'missing'))); } finally { virtualFs.unmount(); } ``` ### How often does it reproduce? Is there a required condition? Always ### What is the expected behavior? Why is that the expected behavior? `fs.statfs()` should reject with `ENOENT`, matching its behavior for nonexistent paths on the native filesystem. ### What do you see instead? `fs.statfs()` resolves with a synthetic VFS filesystem-statistics object even though the requested path does not exist. ### Additional information fs equivalent ```js import fs from 'node:fs/promises'; import os from 'node:os'; import path from 'node:path'; const directory = await fs.mkdtemp(path.join(os.tmpdir(), 'statfs-')); try { console.log(await fs.statfs(path.join(directory, 'missing'))); } finally { await fs.rm(directory, { recursive: true, force: true }); } ``` This rejects with an `ENOENT` error.
Activity
vfs: reject statfs for missing paths
vfs: reject statfs for missing paths