xdg-trash

Safely move files and directories to trash on Linux

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
xdg-trash
1102.0.29 years ago10 years agoMinified + gzip package size for xdg-trash in KB

Readme

xdg-trash Build Status
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