📅  最后修改于: 2022-03-11 15:02:38.249000             🧑  作者: Mango
const fs = require("fs")
fs.access("./directory-name", function(error) {
if (error) {
console.log("Directory does not exist.")
} else {
console.log("Directory exists.")
}
})