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: update behaviour of fs.writeFile #25080

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3605,10 +3605,10 @@ recommended.
1. Any specified file descriptor has to support writing.
2. If a file descriptor is specified as the `file`, it will not be closed
automatically.
3. The writing will begin at the beginning of the file. For example, if the
file already had `'Hello World'` and the newly written content is `'Aloha'`,
then the contents of the file would be `'Aloha World'`, rather than just
`'Aloha'`.
3. The writing will begin at the current position. For example, if the string
`'Hello'` is written to the file descriptor, and if `', World'` is written with
`fs.writeFile()` to the same file descriptor, the contents of the file would
become `'Hello, World'`, instead of just `', World'`.


## fs.writeFileSync(file, data[, options])
Expand Down