1.导入path路径模块
cosnt path=require(‘path’)
(1)路径拼接
../字符串会抵消前面的一个路径/c
(2)path.basename()获取路径中的文件名
(3)path.extname获取文件的扩展名