Skip to content

doc: clarify behaviour of writeFile(fd) - #27282

Closed
sam-github wants to merge 1 commit into
nodejs:masterfrom
sam-github:clarify-writefile
Closed

doc: clarify behaviour of writeFile(fd)#27282
sam-github wants to merge 1 commit into
nodejs:masterfrom
sam-github:clarify-writefile

Conversation

@sam-github

Copy link
Copy Markdown
Contributor

This is a continuing source of confusion, attempt to make it even more
clear.

Fixes: #24923

Checklist

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added doc Issues and PRs related to the documentations. fs Issues and PRs related to the fs subsystem / file system. labels Apr 17, 2019
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Buffer.from(options.encoding) seems a bit confusing here. Is something missing?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

clearer now?

Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated
Comment threaddoc/api/fs.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are 1 and 2 skipped intentionally?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes, now, the difference from fs.write() is described, rather than the previous more complicated way of describing the fd behaviour.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

3 was skipped as well -- which makes the entire previous list being replaced.

This is a continuing source of confusion, attempt to make it even more
clear.
Fixes: nodejs#24923
@sam-github

Copy link
Copy Markdown
ContributorAuthor

@vsemozhetbyt PTAL

@vsemozhetbytvsemozhetbyt added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 24, 2019
@sam-github

Copy link
Copy Markdown
ContributorAuthor

sam-github added a commit to sam-github/node that referenced this pull request Apr 24, 2019
This is a continuing source of confusion, attempt to make it even more
clear.
Fixes: nodejs#24923
PR-URL: nodejs#27282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@sam-github

Copy link
Copy Markdown
ContributorAuthor

Landed in a763de1

@sam-github
sam-github deleted the clarify-writefile branch April 24, 2019 16:04
targos pushed a commit that referenced this pull request Apr 27, 2019
This is a continuing source of confusion, attempt to make it even more
clear.
Fixes: #24923
PR-URL: #27282
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@targostargos mentioned this pull request Apr 27, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.docIssues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fs writeFile after truncate doesn't write at beginning of the file

4 participants

@sam-github@nodejs-github-bot@lpinca@vsemozhetbyt