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

doc: add missing examples and information to fs #55298

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

shrenisc
Copy link

@shrenisc shrenisc commented Oct 6, 2024

Added examples and provided return type definitions

Fixes: #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 Oct 6, 2024
@shrenisc shrenisc force-pushed the statfs_docs_update branch from e2a544c to 267747e Compare October 7, 2024 15:00
@shrenisc
Copy link
Author

shrenisc commented Oct 8, 2024

after research, i confirmed that the js code that I have written follows the cjs format. Could you tell me if there is something else you wanted to be done?

@shrenisc shrenisc force-pushed the statfs_docs_update branch from 267747e to 2af7e01 Compare October 8, 2024 11:57
@shrenisc
Copy link
Author

Hi, are there any more changes needed to be done?

@avivkeller
Copy link
Member

@nodejs/fs PTAL

@aduh95
Copy link
Contributor

aduh95 commented Oct 11, 2024

Can you fix the linter issues please? Let me know if you need help

@shrenisc
Copy link
Author

Can you fix the linter issues please? Let me know if you need help

I have resolved them now. Thank you

doc/api/fs.md Outdated
Comment on lines 7514 to 7516
const fs = require('node:fs');
// Calculate available space in bytes
fs.statfs('.', (err, stats) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the same as the other example:

Suggested change
const fs = require('node:fs');
// Calculate available space in bytes
fs.statfs('.', (err, stats) => {
const { statfs } = require('node:fs');
// Calculate available space in bytes
statfs('.', (err, stats) => {

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't the same as the other example:

i have corected it now

@shrenisc
Copy link
Author

can i get some help on this error:
make: *** [Makefile:1398: lint-js] Error 1
Error: Process completed with exit code 2.

@aduh95
Copy link
Contributor

aduh95 commented Oct 12, 2024

can i get some help on this error: make: *** [Makefile:1398: lint-js] Error 1 Error: Process completed with exit code 2.

Is this an error you see locally? The output from the CI might be clearer to work with

@shrenisc
Copy link
Author

can i get some help on this error: make: *** [Makefile:1398: lint-js] Error 1 Error: Process completed with exit code 2.

Is this an error you see locally? The output from the CI might be clearer to work with

no this is a CI error that i see on the checks.

@shrenisc
Copy link
Author

I am still getting the same error when the PR is checked.

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
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
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
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
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
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
added examples and type definitions

Fixes:nodejs#50749
added examples and type definitions

Fixes:nodejs#50749
@shrenisc
Copy link
Author

I am still getting the same error when the PR is checked.

Hi, can you check now? All checks should pass now.

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
4 participants