|Author: Thomas Tempelmann
TT's CatSearch works by utilizing a method of the Mac OS File Manager called PBCatSearch. This is used by a variety of other programs, most notably Sherlock/Find File. This routine searches for files by either their creator code, file type, or one of various flags on the file. These flags include whether the file is shared, whether or not its visible, is an alias, and what its label is, among other things. The PBCatSearch routine can search with any combination of these attributes on most volumes (some floppies and UDF volumes won't work), and it searches them relatively quickly.
To set up a search, you must first get a handle of a volume. The plugin's CatSearchOpen routine will take any folderitem that points to a volume, and tell you whether or not it can be searched. If it can, you are given a handle to that volume.
After this, you can set the type, creator, and various attributes you want to search for by using the CatSearchSetFileType, CatSearchSetCreator, and CatSearchSetFileFlags methods. The first two are fairly simple, but the last one is rather tedious.
As anyone who writes for Macs in C knows, a series of booleans, or several small numbers are often represented by one number. For example, true-false-false-true could be represented as &b1001. This is how TT's CatSearch forces you to set what you want to look for, and it can be quite tedious to set all the values. Methods to do these would be much more intuitive than the current setup.
After this, you start the search, and cycle through the files found until you get an error. This process is quite simple, and gives you a good bit of control over the search.
TT's CatSearch is an incredibly useful plugin for anyone who needs to be able to search a hard drive, but the inability to search for files by name, size, or date make it a much less useful tool than it could be.
| Pros: Quick. Easy to use. Can search by a variety of means. Good documentation.
Cons: Can't search by file name, size, etc, and thus has limited usefulness. Finding numbers for the flag is a pain. Doesn't work on all volumes.