Question about FSMountServerVolumeSync
Question about FSMountServerVolumeSync
- Subject: Question about FSMountServerVolumeSync
- From: Joe Wollard <email@hidden>
- Date: Tue, 19 Jun 2012 23:10:59 -0400
Is it possible to mount a subdirectory of a server volume using
FSMountServerVolumeSync? As an example, I've got an NSURL that is
basically cifs://example.com/PERSONAL/doej where PERSONAL is the
actual volume, but I want to mount doej as if it were the volume. In
the code below, I'm getting 'PERSONAL' on the Desktop instead of the
desired 'doej'.
mount_afp yields the desired results and shows 'doej' on the Desktop
instead of 'PERSONAL'.
The code I'd love some guidance on is:
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[])
{
@autoreleasepool {
NSURL *url = [NSURL URLWithString:@"cifs://example.com/PERSONAL/doej"];
OSStatus err = FSMountServerVolumeSync(
(__bridge CFURLRef) url,
NULL,
NULL,
NULL,
NULL,
0);
if (err != noErr)
{
NSLog(@"Unable to mount %@", urlString);
}
else {
CFShow((__bridge CFStringRef)mountPoint);
}
}
return 0;
}
--
Joe Wollard
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden