Re: Storing file pathes... what to do if the user move/change them ?
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: Aurélien Hugelé <email@hidden>
- Date: Wed, 11 May 2005 13:34:31 +0200
Thanks for the link, this seems to be what i wanted :) small, clean, and very usefull
On 11 mai 05, at 12:27, Pandaa wrote:
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?
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
|
_______________________________________________
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