Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert dirID / vRefNum to String




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:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >convert dirID / vRefNum to String (From: Jürgen Keser <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.