• 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: Open a file package
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Open a file package


  • Subject: RE: Open a file package
  • From: "Peter Karlsson" <email@hidden>
  • Date: Sat, 9 Oct 2004 12:33:27 +0200

I think I got it now but I'm not sure.

If I want to open a package I do the following:

// package folder
NSFileWrapper *directory = [[NSFileWrapper alloc] initWithPath:@"/myFile"];

// one of the files inside the package (a serialized property list)
NSFileWrapper *file = [[directory fileWrappers] objectForKey:@"Property
List"];

// read the file to NSData
NSData *fileContent = [file regularFileContents];

// deserialize property list
myMutableArray = [NSDeserializer deserializePropertyListFromData:
fileContent mutableContainers: NO];

Is this the right way?

Peter


Ursprungligt meddelande

> Dear list!
>
> I have saved a file package with 2 files in it. One of the files is a
> serialized property list, the other file a .tif image. How do I open the
> package and read the 2 files back to my NSMutableArray and NSImage?
>
> Best regards Peter
>
> _______________________________________________
> 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
>

_______________________________________________
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: Open a file package
      • From: Charles Srstka <email@hidden>
  • Prev by Date: save image into bmp image file type
  • Next by Date: Re: small notes on enabling of menus in a modal window
  • Previous by thread: Open a file package
  • Next by thread: Re: Open a file package
  • Index(es):
    • Date
    • Thread