Skip to content

Missing documentation in fs.StatFs #50749

Description

@NatoBoram

Affected URL(s)

https://nodejs.org/api/fs.html#class-fsstatfs

Description of the problem

  • statfs.bsize fails to mention if the size is reported in bits or bytes
  • While statfs.bavail and statfs.bfree can be used to calculate available and free space, it would be appropriate to put an example on how to use them
    Example:
    import { statfs } from "fs/promises"
    const statsfs = await statfs("/tmp")
    const available_bits_or_bytes_not_documented = statsfs.bsize * statsfs.bavail
  • Similarly, statfs.blocks and statfs.files would strongly benefit from an example
  • What's statfs.type and why is it a number?

Activity

  1. added
    docIssues and PRs related to Node.js documentation.
    on Nov 15, 2023
  2. added
    fsIssues and PRs related to file-system APIs and the fs module.
    on Nov 17, 2023
  3. M-Faheem-Khan commented on Nov 18, 2023

    @M-Faheem-Khan

    Hi I would like to work on this issue, can this be assigned to me? TIA!

  4. juanarbol commented on Dec 13, 2023

    @juanarbol
    Member

    Hi I would like to work on this issue, can this be assigned to me? TIA!

    Go for it!

  5. JuanJFrontDev commented on Dec 27, 2023

    @JuanJFrontDev

    Hi there, I do not know if this was already solved, but I would like to be assigned to it please.

  6. zeffanine-aimen commented on Apr 15, 2024

    @zeffanine-aimen

    Hi, can I work on this issue ?

  7. taiwo2 commented on Oct 1, 2024

    @taiwo2

    Hi, I would like to work on this issue

  8. iamanujkumar commented on Oct 1, 2024

    @iamanujkumar

    Hii, can I work on this issue?

  9. avivkeller commented on Oct 5, 2024

    @avivkeller
    Member

    No need to ask permission, just open a PR :-)

  10. 39 remaining items

  11. added a commit that references this issue on Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docIssues and PRs related to Node.js documentation.fsIssues and PRs related to file-system APIs and the fs module.good first issueIssues that are suitable for first-time contributors.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions