• 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
Mounting remote volumes wit URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mounting remote volumes wit URL


  • Subject: Mounting remote volumes wit URL
  • From: Lorenzo Puleo <email@hidden>
  • Date: Sat, 22 Mar 2003 16:25:18 +0100

In order to mount a remote volume using the API FSMountServerVolumeSync
I need its URL like

afp://PBG3RV.local:548/Lorenzo
or
smb://1.2.3.4


If I write the address, because I know that:
======================================================
sourceURL = CFURLCreateWithString(kCFAllocatorDefault,
CFSTR("afp://PBG3RV.local:548/Lorenzo"), NULL);

osStatus = FSMountServerVolumeSync(sourceURL, NULL,
(CFStringRef)@"lorenzop", (CFStringRef)@"password", &mountedVolumeRefNum,0);
======================================================
Everything works fine. I can mount the volume.



But If I try to get the URL starting from its pathname:
======================================================
sourceURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
(CFStringRef)sourcePath, kCFURLHFSPathStyle, YES);
======================================================
I get an URL referring to "afp://localhost/Volumes/Lorenzo/"
And if I pass this URL to FSMountServerVolumeSync, it doesn't mount the
remote volume.

So, how to get the right URL if starting from the pathname?
Where could I learn more about URLs?
Thanks.

Best Regards
--
Lorenzo Puleo
email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: RE:NSOpenGL
  • Next by Date: Re: object instance names generated on the fly?
  • Previous by thread: creating new instances
  • Next by thread: AECreateAppleEvent
  • Index(es):
    • Date
    • Thread