Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

trash-junk

1.0.2 • Public • Published

trash-junk Build Status

Move system junk files to the trash (recursively)

Install

$ npm install --save trash-junk

Usage

const trashJunk = require('trash-junk');
 
trashJunk(__dirname).then((files) => {
    console.log(files);
});
// => [ '.DS_Store', '__MACOSX' ]

API

trashJunk(input)

Returns a Promise

input

input is a directory you wish to scan

CLI

To install the trash-junk command, run:

$ npm install --global trash-junk-cli

FAQ

What are junk files?

const junk = [
    '.DS_Store',
    '.AppleDouble',
    '.LSOverride',
    'Icon\r',
    '._test',
    '.Spotlight-V100',
    '.Spotlight-V100/Store-V2/C6DBF25D-81D4-4B57-907E-B4A555E72C90/0.directoryStoreFile',
    '.Trashes',
    '__MACOSX',
    'test~',
    'Thumbs.db',
    'ehthumbs.db',
    'Desktop.ini',
    'npm-debug.log',
    '.test.swp'
]

Related

  • trash-junk-cli - Move system junk files to the trash (recursively)
  • junk by Sindre Sorhus - Filter out system junk files like .DS_Store and Thumbs.db

License

MIT © Sergey Lysenko

Install

npm i trash-junk

DownloadsWeekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • avatar