Skip to content

doc,fs: appendFile as an alias, and fix docs

The first commit here changes filehandle.appendFile() so that it simply calls the same backing async function as writeFile. This is because when we're dealing with file handles, it's already open, so no flags are changed. This makes the functions equivalent. This was already true, but this change makes it explicit, saving a stack frame and a few operations.

The second commit updates the docs to reflect this, and makes a few corrections to the filehandle.[read|write|append]File functions. In particular, none of them do anything with mode or flag in the options objects, so they're removed from the documentation. In addition, readFile was making reference to a path argument that isn't there.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading