Quick Answer
The fs module provides functions for working with the file system รขโฌโ reading files, writing files, creating directories, checking if a file exists. Node has both sync versions (fs.readFileSync รขโฌโ blocks until done) and async versions (fs.readFile รขโฌโ non-blocking with a callback). Always prefer async in production to avoid blocking the event loop.
Answer
The fs module provides APIs to create, read, write, and modify files.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.