Getting network volumes full URL

If I do Show info… in Finder on a Volume mounted from a AFP server I can see the full path to the volume

Example: afp://

How can I get this url programmatically?

Please check the MountPathMBS functions in MBS Xojo Plugins.


Thanks Christian

Um… what’s wrong with Volume.NativePath?

Put this code in the open Event of a TextArea:

Dim vols As Integer = VolumeCount - 1 For i As Integer = 0 To vols Me.AppendText "Volume """ + Volume(i).Name + """ Path: " + Volume(i).NativePath + EndOfLine Next

[quote=437502:@Thomas Eckert]Um… what’s wrong with Volume.NativePath?

It does not return the URL, it returns the path to the folder where the share is mounted.

I see. How about a declare like this one statfs.

With “f_mntfromname” you get the server URL. Just add your path on the volume. No plugin needed for this.

Yes, it works. Thanks. :slight_smile:

FWIW: It does not return which protocol is used, afp:// or smb:// for instance-

Check “f_fstypename” for an afp mount it is “afpfs”.
See “man -s2 statfs” for details.