mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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>