• 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: Getting a FSVolumeRefNum from NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Getting a FSVolumeRefNum from NSString


  • Subject: RE: Getting a FSVolumeRefNum from NSString
  • From: Bill Monk <email@hidden>
  • Date: Thu, 15 Sep 2005 02:55:48 -0600

get the path from the user, an NSString, and then I need to use that to derrive the FSVolumeRefNum. I know how to get an FSRef, but not the FSVolumeRefNum. Am I missing some simple conversion? Any ideas?

One more step and you're there:

OSStatus err;
FSRef ref;
err = FSPathMakeRef ( [aVolumePath fileSystemRepresentation], &ref, NULL );
if ( noErr == err ) {


    FSCatalogInfo   catalogInfo;
    err = FSGetCatalogInfo ( &ref,
                              kFSCatInfoVolume,
                              &catalogInfo,
                              NULL,
                              NULL,
                              NULL
                              );
    if ( noErr == err ) {

        FSVolumeRefNum thisVolumeRefNum = catalogInfo.volume;
    }
}

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Disabling Display of JPG and PDF Files in NSTextView
  • Next by Date: Re: cancel editing text in a row
  • Previous by thread: Getting a FSVolumeRefNum from NSString
  • Next by thread: cancel editing text in a row
  • Index(es):
    • Date
    • Thread