fs.readFile()

Convenience functions that read a whole file into memory, or write a whole file, in one call.

In more detail

They are simple and fine for small files, but a large file means a large allocation, so stream big files instead. writeFile replaces the whole file unless you ask for append mode.

Related terms

Taught in

References