To use the mkdirs
function from the fs-extra
package in Node.js, you can follow the below steps:
fs-extra
package using npm:21 chars2 lines
fs-extra
module and use the mkdirs
function to create a folder:index.tsx221 chars12 lines
In the above example, we have provided the path of the folder that we want to create, which is ./myFolder
. The mkdirs
function takes two arguments - the path of the folder to create and a callback function. If there is an error while creating the folder, the callback function will receive an error object. Otherwise, it will be called with no arguments.
gistlibby LogSnag