take pity on rank beginner
take pity on rank beginner
- Subject: take pity on rank beginner
- From: Lorenzo Thurman <email@hidden>
- Date: Sun, 22 May 2005 23:14:59 -0500
I have an app that looks for remote volumes, although I don't make a distinction between types. I use
NSArray* volumesArray = [[NSWorkspace sharedWorkspace] mountedLocalVolumePaths];
to get all the mounted volumes, add them to an array and then test each entry to determine if it is remote using this code:
GetVolParmsInfoBuffer* volParmsInfo;
UInt32 actualInfoSize =
0;
SInt16 size = 0;
OSStatus err =
0;
err = FSGetVolMountInfoSize(vRefnum, &size);
if( noErr == err){
volParmsInfo = malloc(size);
err = FSGetVolParms(vRefnum, size , volParmsInfo, &actualInfoSize);
if(VolIsNetworkVolume(volParmsInfo)){
free(volParmsInfo);
return YES;
}
else {
free(volParmsInfo);
return NO;
}
}
else
return NO;
Take a look at the MoreFilesX API from Apple, some of this stuff is defined there. You'll find it very useful and maybe there's something that will help determine the type of mount.
On May 22, 2005, at 5:53 p, email@hidden wrote:
What I REALLY want is some sample code to get an array of mounted smb
volumes.
"There are 10 types of people in this world: those who understand binary, those who don't"
--Unknown
_______________________________________________
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