What's the fastest way to determine if a file adheres to a particular class's NSCoding implementatio
- by Justin Searls
Given: An application that accesses a directory of files: some plain text, some binary files that adhere to a particular NSCoding implementation, and perhaps other binary files it simply doesn't understand how to process.
I want to be able to figure out which of the files in that directory adhere to my NSCoding class, and I'd prefer not to have to fall back on the naïve approach of loading the entirety of each file into memory, attempting to unarchive each.
Anyone have an elegant approach or pattern to this problem?