1.0.2 • Published 7 years ago

trash-junk v1.0.2

Weekly downloads
20
License
MIT
Repository
github
Last release
7 years ago

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