I writing an application to copy some files to a certain location. It allows the user to choose the destination, which is always on an AFP share. This is done with a NSOpenPanel. The URL that gets returned is: file://localhost/Volumes/Oliver%20Legg's%20Backup/
.
What I want to accomplish is when the application is started, if the AFP share isn't mounted I want it to automatically mount it. What is the best way to do this?
The Get Info command lists the server as: afp://Power Mac G5._afpovertcp.local/Oliver%20Legg's%20Backup
. How can I programatically get this URL from a file URL? I think if I could get that URL I could mount it using FSMountServerVolumeAsync. Is that the best (easiest, most abstracted) API to use?