Directory name of mounted URI



Hi,

I've managed to write a small program in c++ that can mount and unmount shares using GIO. This was developed based on code in gvfs-mount.c in gvfs.

Two questions:

(1) How can one determine where a given URI is mounted in the filesystem using the GIO API?

For example, one of my shares is mounted under ~/.gvfs/smb-share:server-192.168.56.1,share-users.

The output of 'gvfs-mount -l -i' is:

Mount(0): users on 192.168.56.1 -> smb://192.168.56.1/users/
  Type: GDaemonMount
  default_location=smb://192.168.56.1/users/
  themed icons:  [folder-remote]  [folder]
  symbolic themed icons:  [folder-remote-symbolic]  [folder-symbolic]  [folder-remote]  [folder]
  can_unmount=1
  can_eject=0
  is_shadowed=0

However it's not clear how the output corresponds to the directory name. Is there a function call in GIO to determine the directory where the share is mounted in the filesystem?

(2) Is there any way to choose the directory name using GIO? i.e. from ~/.gvfs/smb-share:server-192.168.56.1,share-users to ~/.gvfs/somethingelse for example?

Regards
Prakash



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]