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