📜  节点获取绝对路径 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:45.930000             🧑  作者: Mango

代码示例1
// to get a valid absolute path
resolve = require('path').resolve
resolve('../../bb/tmp.txt')

// to get current file directory
__dirname