Skip to content

docs: add missing documentation for fs.StatFs class (#50749)#61783

Open
zhanglinqian wants to merge 1 commit intonodejs:mainfrom
zhanglinqian:doc-statfs-missing-documentation
Open

docs: add missing documentation for fs.StatFs class (#50749)#61783
zhanglinqian wants to merge 1 commit intonodejs:mainfrom
zhanglinqian:doc-statfs-missing-documentation

Conversation

@zhanglinqian
Copy link

This PR adds missing documentation for the fs.StatFs class as requested in issue #50749.

Changes

  • Clarify that is in bytes (not bits)
  • Add examples for calculating available space using and
  • Add examples for calculating free space using and
  • Add examples for calculating total space using and
  • Add examples for calculating used file node percentage using and
  • Document with explanation of magic numbers and common file system types

Fixes #50749

- Clarify that bsize is in bytes
- Add examples for calculating available space using bsize and bavail
- Add examples for calculating free space using bsize and bfree
- Add examples for calculating total space using bsize and blocks
- Add examples for calculating used file node percentage using files and ffree
- Document statfs.type with explanation of magic numbers

Fixes nodejs#50749
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing documentation in fs.StatFs

2 participants