Mounting remote volumes wit URL
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.