const fs = require('fs'); const path = require('path'); fs.access("mp4/3x3f8rfq39drzey", fs.constants.F_OK, (err) => { // == null 存在 // != null 不存在 if (err) { console.log("=====") fs.mkdirSync(path.join(__dirname, "/mp4/3x3f8rfq39drzey"), 0o777) } });