xdg-trashdeprecated

Safely move files and directories to trash on Linux

Usage no npm install needed!

<script type="module">
  import xdgTrash from 'https://cdn.skypack.dev/xdg-trash';
</script>

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