xdg-trash

Safely move files and directories to trash on Linux

Deprecated in favor of the `trash` module
Last updated 11 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install xdg-trash 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.0.2                                ...           latest (11 years ago)

11 Versions

  • 2.0.2 [deprecated]           ...           11 years ago
  • 2.0.1 [deprecated]           ...           11 years ago
  • 2.0.0 [deprecated]           ...           11 years ago
  • 1.1.0 [deprecated]           ...           12 years ago
  • 1.0.6 [deprecated]           ...           12 years ago
  • 1.0.5 [deprecated]           ...           12 years ago
  • 1.0.4 [deprecated]           ...           12 years ago
  • 1.0.3 [deprecated]           ...           12 years ago
  • 1.0.2 [deprecated]           ...           12 years ago
  • 1.0.1 [deprecated]           ...           12 years ago
  • 1.0.0 [deprecated]           ...           12 years ago
Maintainers (2)
Downloads
Total 41
Today 1
This Week 1
This Month 14
Last Day 0
Last Week 2
Last Month 8
Dependencies (5)
Dev Dependencies (3)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE