June 2025
Intermediate to advanced
837 pages
24h 50m
English
In this chapter, you’ve learned about various methods of the fs module that allow you to deal with files and directories. With Node.js, you can read files and write data to files or create, rename, and delete directories. The fs module also has features that allow you to monitor changes to files or adjust permissions in your file system.
If you use methods from the fs module, you should prefer the asynchronous or the new promise-based version because it doesn’t block the execution of your application. With the synchronous variant, your application must wait until the operating system returns the required result and can’t process any other requests in the meantime.
Read now
Unlock full access