Re: convert dirID / vRefNum to String
Re: convert dirID / vRefNum to String
- Subject: Re: convert dirID / vRefNum to String
- From: Laurence Harris <email@hidden>
- Date: Thu, 29 Jun 2006 10:16:53 -0400
On Jun 29, 2006, at 5:36 AM, Jürgen Keser wrote:
Hi,
I've got an folder path (dirID, vRefNum) of an folder.
You don't really have a path. The string you want is the path.
Now I want to
convert this path to an String. Is there an function that could
make this
for me?
Not directly. You'll need to get an FSRef as an intermediate step.
OSErr DirIDToFSRef( FSVolumeRefNum vRefNum, UInt32 dirID, FSRef
&outRef )
{
FSRefParam refParm = { 0 };
refParm.ioVRefNum = vRefNum;
refParm.ioDirID = dirID;
refParm.newRef = &outRef;
// refParm.textEncodingHint = kTextEncodingUnknown;
return PBMakeFSRefSync( &refParm );
}
Then you can get a path using FSRefMakePath or you can use CFURLs.
After I've got the path as an String I want to change the String and
convert him back as an dirID, vRefNum if there is any function with
that
I can do that.
You'll need to go back through an FSRef. See Files.h and
FSGetCatalogInfo.
Larry _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden