Title: vfs: statfs succeeds for nonexistent paths · Issue #65692 · nodejs/node · GitHub
Open Graph Title: vfs: statfs succeeds for nonexistent paths · Issue #65692 · nodejs/node
X Title: vfs: statfs succeeds for nonexistent paths · Issue #65692 · nodejs/node
Description: Version main Platform All Subsystem vfs What steps will reproduce the bug? import fs from 'node:fs/promises'; import path from 'node:path'; import vfs from 'node:vfs'; const virtualFs = vfs.create(); const mountPoint = virtualFs.mount();...
Open Graph Description: Version main Platform All Subsystem vfs What steps will reproduce the bug? import fs from 'node:fs/promises'; import path from 'node:path'; import vfs from 'node:vfs'; const virtualFs = vfs.create(...
X Description: Version main Platform All Subsystem vfs What steps will reproduce the bug? import fs from 'node:fs/promises'; import path from 'node:path'; import vfs from 'node:vfs'; const...
Opengraph URL: https://github.com/nodejs/node/issues/65692
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"vfs: statfs succeeds for nonexistent paths","articleBody":"### Version\n\nmain\n\n### Platform\n\n```text\nAll\n```\n\n### Subsystem\n\nvfs\n\n### What steps will reproduce the bug?\n\n```js\nimport fs from 'node:fs/promises';\nimport path from 'node:path';\nimport vfs from 'node:vfs';\n\nconst virtualFs = vfs.create();\nconst mountPoint = virtualFs.mount();\n\ntry {\n console.log(await fs.statfs(path.join(mountPoint, 'missing')));\n} finally {\n virtualFs.unmount();\n}\n```\n\n### How often does it reproduce? Is there a required condition?\n\nAlways\n\n### What is the expected behavior? Why is that the expected behavior?\n\n`fs.statfs()` should reject with `ENOENT`, matching its behavior for nonexistent paths on the native filesystem.\n\n### What do you see instead?\n\n`fs.statfs()` resolves with a synthetic VFS filesystem-statistics object even though the requested path does not exist.\n\n### Additional information\n\nfs equivalent\n```js\nimport fs from 'node:fs/promises';\nimport os from 'node:os';\nimport path from 'node:path';\n\nconst directory = await fs.mkdtemp(path.join(os.tmpdir(), 'statfs-'));\n\ntry {\n console.log(await fs.statfs(path.join(directory, 'missing')));\n} finally {\n await fs.rm(directory, { recursive: true, force: true });\n}\n```\n\nThis rejects with an `ENOENT` error.","author":{"url":"https://github.com/trivikr","@type":"Person","name":"trivikr"},"datePublished":"2026-09-01T03:18:19Z","url":"https://github.com/nodejs/node/issues/65692"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d198c4b3-09a7-e2dc-dabb-e78392271bef |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C62A:185F51:123702F:183EB14:6AED58D4 |
| html-safe-nonce | 5df096b9bb4cfc3373dbbb45af759a65e488e3410f31401235ea80677e8efaa4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNjJBOjE4NUY1MToxMjM3MDJGOjE4M0VCMTQ6NkFFRDU4RDQiLCJ2aXNpdG9yX2lkIjoiNzgyNjg3OTg4MDY2ODk5Mzc0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2d5bd0c14e415f855e177a501c0cb0631ea8802c7da4899886146b6c98479292 |
| hovercard-subject-tag | issue:5307411799 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/65692/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3d0f5c41f2bbc1afc57ce87f65644abd7095bf003c1f368553ecea17d3e6cb99/nodejs/node/issues/65692 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3d0f5c41f2bbc1afc57ce87f65644abd7095bf003c1f368553ecea17d3e6cb99/nodejs/node/issues/65692 |
| og:image:alt | Version main Platform All Subsystem vfs What steps will reproduce the bug? import fs from 'node:fs/promises'; import path from 'node:path'; import vfs from 'node:vfs'; const virtualFs = vfs.create(... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trivikr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 56fb42677ae87ed3e64410323d67980aa65d0485568a7858f874e7edfc6d1c11 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c9a37e2423ed382cf39f70b5aa4b4858b40a3b0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width