whomwah/qlstephen — pull request #10 by nacho4d (2012-05-24 08:16:15+00:00)
Title: Added WhiteList and BlackList to prevent previewing real binary files

I just added a function `bool shouldProcessItem(CFURLRef, CFBundleRef)`
that will return true when the file should be previewed. Preventing certain files from being previewed (e.g.: binary files like zip, tar, lib, a, o, etc, commands, etc)

The function is in a separate file because if at some point you decide to implement the thumbnail generation functions I thought it will be easier to use this way.

[In first place][1] I though of using NSUserDefaults but realized that it would be a pain to simply add values so I came up with plists and there are 3 of them:

**QLStephenWhiteList.plist** : files with these names will be ALWAYS previewed
**QLStephenExtensionsBlackList.plist** : files with these extensions will NOT be previewed
**QLStephenDirectoriesBlackList.plist** : files contained in directories with these names will NOT be previewed

Everyone has its own needs so they are free to modify the plists as they need :) Works great for me.

[1]:https://github.com/whomwah/qlstephen/issues/1