How do I implement document packages (documents that are really folders, but appear to be opaque documents)?
Usually, an application that wants its documents to be document packages will use the NSFileWrapper class to construct and access its documents. If this is true for some or all of the types that your document class supports, then instead of overriding dataRepresentationOfType: and loadDataRepresentation:ofType:, you should override fileWrapperRepresentationOfType: and loadFileWrapperRepresentation:ofType:. These methods are much the same as the “data” methods, but they use NSFileWrappers instead. You should also specify, in the document types section of your application’s information property list, that documents of the specified type are packages (as described in “Storing Document Types Information in a Property List”).