📅  最后修改于: 2022-03-11 15:02:42.333000             🧑  作者: Mango
const fs = require('fs');
// directory to check if exists
const dir = './uploads';
// check if directory exists
fs.access(dir, (err) => {
console.log(`Directory ${err ? 'does not exist' : 'exists'}`);
});