path模块JavaScripttypescriptnodejs
适用范围:
1. 作用:
- 将两个绝对路径之间的路径转换为相对路径
语法:
path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
// 返回: '..\\..\\impl\\bbb'
path模块JavaScripttypescriptnodejs
path.relative('C:\\orandea\\test\\aaa', 'C:\\orandea\\impl\\bbb');
// 返回: '..\\..\\impl\\bbb'