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

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


  • Subject: Re: Storing file pathes... what to do if the user move/change them ?
  • From: Pandaa <email@hidden>
  • Date: Wed, 11 May 2005 12:27:52 +0200


11 maj 2005 kl. 11.33 skrev Aurélien Hugelé:

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 :)


Did you try this?

http://bdistributed.com/Projects/BDAlias/index.html

.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .

. email@hidden .  . www.synapticpulse.net .


 _______________________________________________
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: Aurélien Hugelé <email@hidden>
References: 
 >Storing file pathes... what to do if the user move/change them ? (From: Aurélien Hugelé <email@hidden>)

  • Prev by Date: New ABPerson properties not saved in vCards
  • Next by Date: NSTableView, checkbox columns & double clicks
  • Previous by thread: Storing file pathes... what to do if the user move/change them ?
  • Next by thread: Re: Storing file pathes... what to do if the user move/change them ?
  • Index(es):
    • Date
    • Thread