• 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: Save data as package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Save data as package


  • Subject: Re: Save data as package
  • From: Volker Runkel <email@hidden>
  • Date: Wed, 8 Mar 2006 09:19:13 +0100

Hi Kolja,

in an app (Document-based), for writing such data I just make sure the package exists as directory and write my data files inside that directory. My app knows that this file type is a package (setting via Target->Get Info).

For reading I use the following:

- (BOOL)loadFileWrapperRepresentation:(NSFileWrapper *)wrapper ofType: (NSString *)docType
{
//case where file is a package, then Main is the file that we want inside
NSFileWrapper *mainFile, *dataFile, *infoFile;
if ([wrapper isDirectory]) {
mainFile=[[wrapper fileWrappers] objectForKey:@"sound.raw"];
dataFile=[[wrapper fileWrappers] objectForKey:@"data.plist"];
infoFile=[[wrapper fileWrappers] objectForKey:@"info.plist"];
}


	// do something else if not a package!
}


Volker

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Save data as package (From: Kolja Wawrowsky <email@hidden>)

  • Prev by Date: Plus and minus images
  • Next by Date: is nullify causing an exception
  • Previous by thread: Save data as package
  • Next by thread: [OT?] Intercept Links in WebView
  • Index(es):
    • Date
    • Thread