美文网首页
path.resolve() 方法

path.resolve() 方法

作者: panw3i | 来源:发表于2018-02-03 15:12 被阅读15次
path.resolve('foo/bar', '/tmp/file/', '..', 'a/../subfile')

相当于在命令行执行如下操作


$ cd foo/bar
$ cd /tmp/file/
$ cd ..
$ cd a/../subfile
$ pwd

相关文章

网友评论

      本文标题:path.resolve() 方法

      本文链接:https://www.haomeiwen.com/subject/ywyuzxtx.html