Re: NSData archival of a directory
Re: NSData archival of a directory
- Subject: Re: NSData archival of a directory
- From: Ben Kazez <email@hidden>
- Date: Wed, 28 Sep 2005 17:20:59 -0500
On Sep 28, 2005, at 5:01 PM, Douglas Davidson wrote:
On Sep 28, 2005, at 2:50 PM, Ben Kazez wrote:
I need to create an NSData object representing an entire directory
(actually a bundle, if that makes a difference), so I can use that
directory as a value in a Sync Services schema. I could use tar
+gzip, tar+bzip, hdiutil, and probably other methods. The
directories are usually small (70K-500K), so compression is not a
primary concern. Any thoughts on the best (cleanest, fastest,
simplest) way?
NSFileWrapper has a serialized representation that can be used for
this.
Sorry, that should have been obvious to me after some searching. I
missed it by searching for numerous variations on "cocoa serialize
directory" instead of "cocoa serialized directory" (note the D on
serialized). Anyway, -[NSFileWrapper serializedRepresentation] will
work perfectly.
Any chance that this serialized representation is compressed? As I've
said, compression isn't required, but it would be nice since the data
will be sent to .Mac servers.
Thanks,
Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden