2

I'm trying to find a somewhat more comprehensive writeup, or an example to refer to regarding a Document Based Application which saves it's contents to a document bundle rather than a single file.

A good example of what I mean by a document bundle is how Pages saves it's documents i.e.

Document Name.myextension\
                          directory1\
                                     somefile.ext
                                     somefile2.ext
                          directory2\
                          directory3\
                          file1.png
                          file2.png

As we know apples documentation, although extensive, can, at the best of times be somewhat daunting to work with :-/

Any help would be appreciated!

Thanks

Ade

Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66
Adrian Sluyters
  • 2,186
  • 1
  • 16
  • 21

1 Answers1

4

Take a look at the following Stack Overflow question:

NSDocument to hold a complete folder?

If the answer to that question isn't detailed enough, you can read the following article on file packages:

Working with Cocoa File Packages

Regarding Apple's documentation, the relevant classes to look at are NSFileWrapper, NSData, and NSDocument.

Community
  • 1
  • 1
Swift Dev Journal
  • 19,282
  • 4
  • 56
  • 66
  • Thanks... After some ploughing and wading through the myriads of apple docs, I managed to get the swing of things. None the less, those two links you shares were priceless gems of help! – Adrian Sluyters Feb 08 '15 at 23:46