• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSData archival of a directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSData archival of a directory
      • From: Ricky Sharp <email@hidden>
References: 
 >NSData archival of a directory (From: Ben Kazez <email@hidden>)
 >Re: NSData archival of a directory (From: Douglas Davidson <email@hidden>)

  • Prev by Date: Re: CoreText Framework?
  • Next by Date: Re: NSTextView typing speed - slowdown at top?
  • Previous by thread: Re: NSData archival of a directory
  • Next by thread: Re: NSData archival of a directory
  • Index(es):
    • Date
    • Thread