Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #31235 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
- Loading branch information