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:Rich Trott <rtrott@gmail.com> Reviewed-By:
Anto Aravinth <anto.aravinth.cse@gmail.com>
parent
a566c05a
Please register or sign in to comment