Re: file references in CoreData
Re: file references in CoreData
- Subject: Re: file references in CoreData
- From: Uli Kusterer <email@hidden>
- Date: Wed, 29 Oct 2008 18:50:29 +0100
On 29.10.2008, at 09:59, Dirkjan Krijnders wrote:
When using Leopard this is easy: you can store any data type in core
data using the 'Transformable' type. Use this to store instances of
NSURL that point to your files see
http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html
for more information.
I'd recommend going for an Alias Record instead. URLs are just as
fragile as file paths. NDAlias or BDAlias can be serialized to NSData.
Keep the path as a backup, but really, recovering files across
restarts and tracking them even if the user moves them or the drive
gets mounted under a different mount point is a job for Aliases.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
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