JavaScript

How To Work with Files using the fs Module in Node.js — step-by-step Javascript tutorial on Progressive Robot

How To Work with Files using the fs Module in Node.js

With Node.js, you can use JavaScript to programmatically manipulate files with the built-in fs module. The name is short for “file system,” and the module contains all the functions you need to read, write, and delete files on the local machine. In this article, you will use the asynchronous fs module to read a file with fs.readFile(), create and write to a new file with fs.writeFile(), delete the file with fs.unlink(), and move the first file with fs.rename().

Read more
CHAT