RE: Getting a FSVolumeRefNum from NSString
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