Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing documentation in fs.StatFs #50749

Open
NatoBoram opened this issue Nov 15, 2023 · 7 comments · May be fixed by #55298 or #57062
Open

Missing documentation in fs.StatFs #50749

NatoBoram opened this issue Nov 15, 2023 · 7 comments · May be fixed by #55298 or #57062
Labels
doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. good first issue Issues that are suitable for first-time contributors.

Comments

@NatoBoram
Copy link

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?
@NatoBoram NatoBoram added the doc Issues and PRs related to the documentations. label Nov 15, 2023
@debadree25 debadree25 added the fs Issues and PRs related to the fs subsystem / file system. label Nov 17, 2023
@M-Faheem-Khan
Copy link

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

@juanarbol juanarbol added the good first issue Issues that are suitable for first-time contributors. label Dec 13, 2023
@juanarbol
Copy link
Member

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

Go for it!

@JuanJFrontDev
Copy link

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

@zeffanine-aimen
Copy link

Hi, can I work on this issue ?

@taiwo2
Copy link

taiwo2 commented Oct 1, 2024

Hi, I would like to work on this issue

@iamanujkumar
Copy link

Hii, can I work on this issue?

@avivkeller
Copy link
Member

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

shrenisc added a commit to shrenisc/node that referenced this issue Oct 6, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
@shrenisc shrenisc linked a pull request Oct 6, 2024 that will close this issue
shrenisc added a commit to shrenisc/node that referenced this issue Oct 7, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 7, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 8, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 8, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 8, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 10, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 10, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 10, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 10, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 11, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
added examples and type definitions

Fixes:nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
Defined the return type for statfs.bsize. Added examples for statfs.bavail, statfs.bfree, statfs.blocks and statfs.files for clarity. Explained why statfs.type returns a int|bigint value and added a table with most commonly used magic numbers and their filesystems.

Fixes: nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
added examples and type definitions

Fixes:nodejs#50749
shrenisc added a commit to shrenisc/node that referenced this issue Oct 12, 2024
added examples and type definitions

Fixes:nodejs#50749
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. good first issue Issues that are suitable for first-time contributors.
Projects
None yet
9 participants