Safely move files and directories to trash on Linux
$ npm install xdg-trash
Safely move files and directories to trash on Linux
$ npm install --save xdg-trash
const xdgTrash = require('xdg-trash');
xdgTrash(['foo.txt', 'bar.tar']).then(() => {
console.log('Files successfully moved to trash!');
});
Move files to trash. Returns a promise that resolves to an array containing the removed files.
Required
Type: array
Files to be moved to trash.
See the trash CLI.
MIT © Kevin Mårtensson
© 2010 - cnpmjs.org x YWFE | Home | YWFE