Re: Locating moved or renamed file
Re: Locating moved or renamed file
- Subject: Re: Locating moved or renamed file
- From: Ryan McGann <email@hidden>
- Date: Sat, 8 Nov 2003 23:07:57 -0800
If I store a reference to a file as path and filename, whenever the
file is renamed or moved, I loose that link. This does not happen, for
example, in iTunes - the app appears to be keeping track of songs in
its library even if they are moved or renamed via Finder.
iTunes is using Carbon aliases. Aliases follow files when they're moved
and renamed, even across volumes. Look at Aliases.h in CarbonCore
(which is inside the CoreServices framework). There are some freeware
Cocoa frameworks that are wrappers for the Carbon functions; one
popular one (which I didn't write, nor have used, but have seen others
mention it) is
http://homepage.mac.com/nathan_day/.
Ryan
email@hidden
Arguing with an engineer is like wrestling with a pig in mud.
After a while, you realize the pig is enjoying it.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.