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

[SOLVED] RE: Getting a FSVolumeRefNum from NSString


  • Subject: [SOLVED] RE: Getting a FSVolumeRefNum from NSString
  • From: email@hidden
  • Date: Fri, 16 Sep 2005 02:05:42 +0000

Works like a champ.  Thanks Bill!

Kris


> > 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: playing with arcs
  • Next by Date: Re: Xcode custom new file templates?
  • Previous by thread: Getting information out of a PDF with PDFKit
  • Next by thread: Keeping windows hidden
  • Index(es):
    • Date
    • Thread