# Reading and Writing Files

Node's fs/promises module reads a whole text file with readFile, saves one with writeFile, adds to one with appendFile, and reports a missing file with the error code ENOENT, which your code can catch and explain.

![Cheat sheet: Reading and Writing Files](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/42bb94b73d8b4bd9a1c7ab69be550160.webp)

- Category: Node.js
- Level: Apprentice
- Tags: async/await in Node, ENOENT, fs Module, JavaScript, nodejs, text-encoding
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-files-read-and-write-cheat-sheet
