2.0.0 • Published 10 years ago
osx-trash v2.0.0
node-osx-trash 
Move files to the trash using the
osx-trashbinary
Install
$ npm install --save osx-trashUsage
const osxTrash = require('osx-trash');
osxTrash(['unicorn.png', 'rainbow.jpg']).then(() => {
console.log('Successfully moved files to the trash');
});Supports any OS X version. On OS X 10.7 or lower it will fall back to AppleScript which makes a sound when trashing.
CLI
$ npm install --global osx-trash$ trash unicorn.png rainbow.pngRequires OS X 10.8 or higher.
Related
See trash for a cross-platform trash CLI app.
License
MIT © Sindre Sorhus