Re: newbie q - referencing files
Re: newbie q - referencing files
- Subject: Re: newbie q - referencing files
- From: Doug Wyatt <email@hidden>
- Date: Wed, 23 Oct 2002 09:24:29 -0700
Don't store FSRefs -- it's not guaranteed that one will be valid if you
save it to persistent storage and re-load it.
Save a URL, Posix path, or contents of an AliasHandle (which is what I
still prefer because it will find the file if it gets moved to a
different folder).
e.g. save:
AliasHandle ah;
OSErr err = FSNewAlias(NULL, &theTargetFSRef, &ah);
UInt32 aliasSize = GetHandleSize((Handle)ah);
HLock(ah);
Byte *aliasPtr = (Byte *)*ah;
...
Doug
On Wednesday, Oct 23, 2002, at 00:38 US/Pacific, Urs Heckmann wrote:
Hi Art & Carsten,
thanks for the info. I'm sure this will have saved me a lot of hassle!
I store everything I need to recreate an FSSpec in my plug-ins.
I would store FSRefs (or posix paths/CFURL) in the ClassInfo's 'data'
property.
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.com
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.