• 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
Question about FSMountServerVolumeSync
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: nstableview reload with animation possible?
  • Next by Date: Re: nspopbutton short title possible?
  • Previous by thread: Re: Calculating lineFragment for NSTextContainer
  • Next by thread: ARC and CFType release callback
  • Index(es):
    • Date
    • Thread