xdg-trashdir
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

xdg-trashdir Build Status

Get the correct trash path on Linux according to the spec

Install

$ npm install --save xdg-trashdir

Usage

const xdgTrashdir = require('xdg-trashdir');

xdgTrashdir().then(dir => {
	console.log(dir);
	//=> /home/johndoe/.local/share/Trash
});

xdgTrashdir('foo.zip').then(dir => {
	console.log(dir);
	//=> /media/johndoe/UUI/.Trash-1000
});

API

xdgTrashdir([file])

Returns a promise that resolves the path to the trash.

file

Type: string

Get the trash path for a specific file.

License

MIT © Kevin Mårtensson

Package Sidebar

Install

npm i xdg-trashdir@2.0.0

Version

2.0.0

License

MIT

Last publish

Collaborators

  • kevva
  • sindresorhus