path.resolve('foo/bar', '/tmp/file/', '..', 'a/../subfile')
相当于在命令行执行如下操作
$ cd foo/bar
$ cd /tmp/file/
$ cd ..
$ cd a/../subfile
$ pwd
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
网友评论