• 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
NetFSMountURLSync with a specific mountpath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NetFSMountURLSync with a specific mountpath


  • Subject: NetFSMountURLSync with a specific mountpath
  • From: "Grigutis, John Anthony" <email@hidden>
  • Date: Wed, 28 Nov 2012 18:36:56 +0000
  • Thread-topic: NetFSMountURLSync with a specific mountpath

Hi all,

I'm trying to programmatically mount some WebDAV shares and I'd like to give the volumes specific names other than the default. For example, if I mount

https://my.sharepoint.school.edu/personal/grigutis

I'd like it to appear in the Finder as

/Volumes/My SharePoint Site

Instead of

/Volumes/grigutis

I can do this with the mount_webdav command:

$ mkdir /Volumes/My\ SharePoint\ Site
$ mount_webdav -s https://my.sharepoint.school.edu/personal/grigutis /Volumes/My\ SharePoint\ Site

But I can't get this working with NetFSMountURLSync:

NSURL *url = "" URLWithString:@"https://my.sharepoint.school.edu/personal/grigutis"];
NSURL *mountpath = [NSURL fileURLWithPath:@"/Volumes/My SharePoint Site" isDirectory:YES];
CFArrayRef mountpoints = NULL;
int result = 0;
result = NetFSMountURLSync((__bridge CFURLRef)url,
(__bridge CFURLRef)mountpath,
CFSTR("Kerberos"),
CFSTR("NoPassword"),
NULL,
NULL,
&mountpoints);

If the mount path directory exists, I get the Finder dialog:

'There was a problem connecting to the server "my.sharepoint.school.edu". You do not have permission to access this server.'

and the function returns result 13.

If the mount path directory does not exist, I get the Finder dialog:

'There was a problem connecting to the server "my.sharepoint.school.edu". The share does not exist on the server. Please check the share name, and then try again.'

and the function returns result 2. Calling the function with NULL for the mountpath argument works as expected.

The only documentation I can find is in NetFS.h. Does anyone see anything wrong with my code or is this a bug?

-- 
John Anthony Grigutis
Systems Analyst/Programmer/Mac Specialist
UITS Support Systems, Licensing, & Software Distribution
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Pseudo terminal sockets and disabling utf8 encoding?
  • Previous by thread: Pseudo terminal sockets and disabling utf8 encoding?
  • Index(es):
    • Date
    • Thread