Master Node.js core modules to read, write and process files and system resources with confidence. You will use fs, path, os, process and url, handle text and JSON safely, react to events with EventEmitter, and stream large files without exhausting memory.
Watch the free preview
Reading files — synchronous vs asynchronous — free to watch, no account needed.
What you'll learn
- Read, write and process files and system resources using Node.js core modules
- Choose correctly between synchronous and asynchronous fs operations
- Build cross-platform paths and inspect the OS and process with path, os and process
- React to application events by using and extending EventEmitter
- Stream and buffer large files so memory stays flat regardless of file size
Syllabus
Reading & Writing Files with fs
Reading files — synchronous vs asynchronousFree preview
Writing, appending and JSON files
Paths, URLs & System Resources
The path and url modules
Directories, os and process
Events & the EventEmitter
The events module and EventEmitter
Event patterns — once, removal and errors
Streams & Buffers for Large Files
Buffers and reading large files
Streams and piping data
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10