
Code Snippet
const path = require('path');
info = path.parse('./temp/dir1/test.jpg')
console.log(info)
{
root: '',
dir: './temp/dir1',
base: 'test.jpg',
ext: '.jpg',
name: 'test'
}
const path = require('path');
info = path.parse('./temp/dir1/test.jpg')
console.log(info)
{
root: '',
dir: './temp/dir1',
base: 'test.jpg',
ext: '.jpg',
name: 'test'
}