• 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
Storing file pathes... what to do if the user move/change them ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Storing file pathes... what to do if the user move/change them ?


  • Subject: Storing file pathes... what to do if the user move/change them ?
  • From: AurĂ©lien HugelĂ© <email@hidden>
  • Date: Wed, 11 May 2005 11:33:36 +0200

Hi list !

suppose i'm working on a *mini* application that links files to "projects". Each project has a name and can have many files attached to it.

Currently I'm storing the file pathes (NSString*) in an NSArray that i save to disk at the termination of the app. At next launch i read this archived NSArray and display projects with their attached files. I use NSFIleManager.
This is very easy to do, but has a major drawback : what happens if the user move one of the files ? or if he renames one ?


I've seen some applications that are able to keep the "links" alive, i mean that they are able to retrieve files that have been moved ! (exactly what happens when you move an original file and that an Alias still point to it)

how is it achieved ? i suspect carbon calls and something like FSRef... but then how do i keep a FSRef persistent ? how can i keep it in a file that i'll load at next launch ?

please advise :)
_______________________________________________
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: Storing file pathes... what to do if the user move/change them ?
      • From: "John C. Daub" <email@hidden>
    • Re: Storing file pathes... what to do if the user move/change them ?
      • From: Pandaa <email@hidden>
  • Prev by Date: Re: Sceen Grabbing
  • Next by Date: New ABPerson properties not saved in vCards
  • Previous by thread: Re: forwarding KVO from NSDocument to model
  • Next by thread: Re: Storing file pathes... what to do if the user move/change them ?
  • Index(es):
    • Date
    • Thread