[Thunar-dev] ThunarVFS, volumes and pathes

Christophe Chapuis chris.chapuis at gmail.com
Wed Feb 20 08:09:03 CET 2008


Well, looks like I've partially found why my problem occurs...
It looks like when I'm listing all the known volumes and ask for they
mount path, it returns me pathes like "file:///media/sda1",
"file:///media/sda2", ..., the volume being mounted or not. Therefore
I understand that as a consequence
thunar_vfs_volume_manager_get_volume_by_info doesn't work well.

I don't have any idea where it did take that sort of path, it's not at
all like that in my fstab, for example.

Christophe

On Sun, Feb 17, 2008 at 7:31 PM, Christophe Chapuis
<chris.chapuis at gmail.com> wrote:
> Ok, I will look more closely why it doesn't return a pointer in my
>  case. Perhaps just a little mistake from me.
>
>  For the trash path, you're right, once we are on the Vfs API there's
>  no reason to be able to translate it to a unix path... I'll deal with
>  the VFS for the code related to the trash, then.
>
>  Thanks !
>
>  Christophe
>
>  On Feb 17, 2008 6:38 PM, Benedikt Meurer
>
>
> <benedikt.meurer at unix-ag.uni-siegen.de> wrote:
>  > 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
>  >
>  > Benedikt
>  > _______________________________________________
>  > Thunar-dev mailing list
>  > Thunar-dev at xfce.org
>  > http://foo-projects.org/mailman/listinfo/thunar-dev
>  >
>



More information about the Thunar-dev mailing list