Given an FSRef of a directory, one can use FSGetCatalogInfo
to find the volume reference number and the directory ID. Together, these two numbers should be enough to identify the directory. One way to go the other direction would be use FSMakeFSSpec( vRefNum, dirID, "\p", &fileSpec )
and then FSpMakeFSRef( &fileSpec, &dirRef )
. However, FSMakeFSSpec
and FSpMakeFSRef
are deprecated. I'm wondering whether there is a way to go from vRefNum and dirID to FSRef using functions that are not deprecated.
views:
19answers:
2
A:
I've never used it, but it seems FSResolveNodeID
may do what you want. Apple pretty much scrubbed its ADC site clean of everything Carbon so I can't find a link to it. But you can look it up in Files.h
. Also, it's only available in 10.5 or later.
Stephen Chu
2010-06-23 20:17:26
You're right, it's undocumented except for header comments. Too bad it requires 10.5, since `FSMakeFSSpec` was deprecated in 10.4.
JWWalker
2010-06-24 16:12:08
A:
"Apple pretty much scrubbed its ADC site clean of everything Carbon so I can't find a link to it." Nope, see http://developer.apple.com/legacy/mac/library/
Yuhong Bao
2010-08-28 01:49:21