Commit 73a9c373 authored by Bryan English's avatar Bryan English Committed by Rich Trott
Browse files

fs: use async writeFile in FileHandle#appendFile

When operating on a FileHandle, the file has already been opened with
the flag given as an option to fs.promises.open(). This means defaulting
to 'a' has no effect here, and FileHandle#appendFile turns out to
exactly be an alias of writeFile. This is now explicit, saving a stack
frame, object copy and assignment.

PR-URL: https://github.com/nodejs/node/pull/31235


Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarAnto Aravinth <anto.aravinth.cse@gmail.com>
parent a566c05a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment