Move system junk files to the trash (recursively)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.eslintrc
.gitattributes
.gitignore
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

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