Docs
/
Node Express
Chapter 2
02 — File System & Path
Core Concepts
- fs/promises — async file operations (recommended)
- fs (sync) —
readFileSync,writeFileSync— blocks the event loop - path — cross-platform path manipulation
- Reading —
readFile,readdir,stat - Writing —
writeFile,appendFile,mkdir,rm - Watching —
fs.watchfor file change detection - Streams — efficient for large files (covered in topic 03)