node提供了3种获取路径的方法 ,在当前目录下,运行node const {resolve} = require('path') console.log('__dirname : ' + __dirname) console.log('resolve : ' + resolve('./')) console.log('cwd : ' + process.cwd()) //__dirname : D:\new\node //resolve : D:\new\node //cwd : D:\ne…