Answers for "is directory node js"

3

fs check if dir is dir

fs.lstatSync(path_string).isDirectory()
Posted by: Guest on June-05-2021
0

node js create or check directory

//Synchronously
fs.mkdirSync('./path/to/my/directory', { recursive: true })

//Asynchronously
await fs.promise.mkdir('./path/to/my/directory', { recursive: true })
Posted by: Guest on August-09-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language