19.6 Directory Operations
In addition to editing files, you can also manipulate entire directories with using the fs module of Node.js. The range of available operations extends from creating to renaming to deleting directories. But there’s also a wide range of usage areas for this type of file system operations. For example, if you create an installation routine for your application in Node.js, you can generate the necessary directory structure.
Directories appear in your application whenever you need to structure larger amounts of files. A concrete example of this is cache files that you place in a directory structure for faster access. The search operations of the operating systems are usually faster in a deeper directory structure with ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access