摘要: var fs=require('fs') let appName=process.argv[2] let appPath=__dirname+'/'+appName if(fs.existsSync(appPath)){ console.log('目录已存在'); process.exit() } 阅读全文
posted @ 2022-02-27 12:33 7c89 阅读(91) 评论(0) 推荐(0)
摘要: 删除文件夹 var fs = require('fs') function rmdir(dirPath) { let files = fs.readdirSync(dirPath) // console.log(files); files.forEach(child => { let childPa 阅读全文
posted @ 2022-02-27 12:21 7c89 阅读(32) 评论(0) 推荐(0)