Get the correct trash path on Linux according to the spec
$ npm install --save xdg-trashdir
const xdgTrashdir = require('xdg-trashdir');
xdgTrashdir().then(dir => {
console.log(dir);
//=> /home/johndoe/.local/share/Trash
});
xdgTrashdir('foo.zip').then(dir => {
console.log(dir);
//=> /media/johndoe/UUI/.Trash-1000
});
Returns a promise that resolves the path to the trash.
Type: string
Get the trash path for a specific file.
MIT © Kevin Mårtensson