const path = require('path')
const pathfile = '/user/a/b/c'
const pathfile2 = '/user/a/b/c/a.txt'
const pathfile3 = 'j.txt'
1.path.basename
console.log(path.basename(pathfile))
console.log(path.basename(pathfile2,'.txt'))
2.path.dirname
console.log(path.dirname(pathfile2))
3.path.extname
console.log(path.extname('extname'+ pathfile2))
4.path.join
console.log(path.join(pathfile,pathfile2))
5.path.resolve
console.log(path.resolve(pathfile2))
console.log(path.resolve(pathfile,pathfile3))
6.path.parse
console.log(path.parse(pathfile2));