i wanted to get only filename
being changed,removed,rename
but i'm getting full file path
Question: i wanted to get full filename
being changed rather path or doing string on full path
here is what i'm trying:
var fileLocation = path.join(__dirname, 'folder/');
var watcher = chokidar.watch(fileLocation, {
persistent: true
});
watcher
.on('add', path => {console.log(`File ${path} has been added name:`); })
.on('change', path => {console.log(`File ${path} has been changed`);});
.on('unlink', path => { console.log(`File ${path} has been removed`); });