Reputation: 22717
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.
Upvotes: 3
Views: 737
Reputation: 12832
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.
Upvotes: 3