[Thunar-dev] ThunarVFS, volumes and pathes

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Sun Feb 17 18:38:44 CET 2008

Christophe Chapuis wrote:
> Hello !
> I'm currently trying to develop a little plugin for cairo-dock, in
> order to have a better integration inside Xfce. It consists in
> implementing some wrapper methods to do simple things with the VFS,
> like listing the volumes, accessing the trash, (un)mounting, etc...
> I've finished the first draft, and it begins to work. But I'm facing
> some problems with some functions of ThunarVfs... So perhaps you have
> some ideas about it.
> 1) I'm trying to use thunar_vfs_volume_manager_get_volume_by_info in
> order to know if a given URI is mounted or not. For example, I've got
> "file:///home/chris/Documents", which is abviously mounted because it
> is on "/home". But.... it doesn't find the volume! I just get a NULL
> pointer.... Why ?

Hm, this function simply checks all currently reported volumes (from 
HAL) for a volume that contains the actual file. See 
thunar-vfs-volume-manager.c. Dunno why that should fail for you.

> 2) I would like to get the unix path of the trash. I used
> thunar_vfs_path_dup_string with a ThunarVfsPath associated with
> "trash:/", but it returns "/"... How could I retrieve
> "/home/chris/.local/share/Trash" ?

You cannot retrieve the Unix path, because there might not even be 
something like this (well, actually currently, there needs to be one, 
but this will change in the future).

> If you could help me, I'd be very grateful !
> Christophe


More information about the Thunar-dev mailing list