Re: Save data as package
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