The formatMatchesFileHandle:atOffset: class method answers
true if the given file matches the receiver's format,
false if it does not. For example, the following code tests whether the file named
my-image.pcx is actually a PCX image file:
The formatMatchingFileHandle:atOffset:ifNone: class method determines which format matches the given file. It answers the appropriate file format class if a matching format was found. If one was not found, the block passed as the last argument is evaluated and its result is answered. The following code determines the format of the file named
my-image.pcx: