• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: convert dirID / vRefNum to String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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

  • Prev by Date: Re: Remote Debugging XC 2.3 -> OS 10.3.9
  • Next by Date: Re: convert dirID / vRefNum to String
  • Previous by thread: convert dirID / vRefNum to String
  • Next by thread: Re: convert dirID / vRefNum to String
  • Index(es):
    • Date
    • Thread