• 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: UIDocument with NSFileWrapper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIDocument with NSFileWrapper


  • Subject: Re: UIDocument with NSFileWrapper
  • From: email@hidden
  • Date: Sat, 19 Mar 2016 21:54:11 -0400

> On Mar 19, 2016, at 8:01 PM, Quincey Morris <email@hidden> wrote:
>
> On Mar 19, 2016, at 14:23 , email@hidden wrote:
>>
>> My thought is to have a dictionary mapping each image filename to a NSFileWrapper
>
> You already have one, basically. The top level wrapper for a package is a directory wrapper, which lists the wrappers of contained files, indexed by file name.

Yes, right now I have that wrapper saving a JSON file that I read/write back into my model.

The documentation I found for NSFileWrapper handles the case where there are a fixed number of files with names known at compile time so I’m struggling to understand what to do when the number of files can vary and the names aren’t known at compile time.

What I’m having trouble understanding is how I store the images (whose filenames will vary from document to document) with NSFileWrapper. In my top level directory do I have my main model file as a JSON file along with a file (JSON or plist) that lists all the images and then have an Image directory that another NSFileWrapper is used to read/write the images (that are stored in the Image subdirectory)?

Or can I simply store all the files without a subdirectory? I still suspect I need to have a file with a fixed name (such as image.plist) that tells me what all the other filenames are to put in the NSFileWrapper (vs. using NSFileManager to ask for the name of all the files).

Thanks for all your input.

Dave Reed





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: UIDocument with NSFileWrapper
      • From: Quincey Morris <email@hidden>
References: 
 >UIDocument with NSFileWrapper (From: email@hidden)
 >Re: UIDocument with NSFileWrapper (From: Quincey Morris <email@hidden>)
 >Re: UIDocument with NSFileWrapper (From: email@hidden)
 >Re: UIDocument with NSFileWrapper (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: NSTableView edit line, prevent dialog close with return key
  • Next by Date: Re: Window updates stall on headless Mac mini
  • Previous by thread: Re: UIDocument with NSFileWrapper
  • Next by thread: Re: UIDocument with NSFileWrapper
  • Index(es):
    • Date
    • Thread