Answers for "nodejs fs directory exists"

0

nodejs fs directory exists

const fs = require("fs")

fs.access("./directory-name", function(error) {
  if (error) {
    console.log("Directory does not exist.")
  } else {
    console.log("Directory exists.")
  }
})
Posted by: Guest on October-08-2020

Code answers related to "nodejs fs directory exists"

Code answers related to "Javascript"

Browse Popular Code Answers by Language