[Thunar-dev] ThunarVFS Questions
Ori Bernstein
rand_chars at rogers.com
Sun Nov 5 23:22:39 CET 2006
Hi.
I'm writing a panel applet with ThunarVFS, and I have a couple of API
questions and suggestions:
- Is there any way to test if a file exists?
I need this because a large number of apps save by writing to a temporary
file, and then unlinking the file. Of course, this causes a "Delete" event
for the file, so I'm working around this by adding a timeout on delete that
checks if the file exists a short time after it gets deleted. Right now,
I'm getting the filename from ThunarVFS, and stat(2)'ing the file, but it
would be better if ThunarVFS let me do this directly:
gboolean thunar_vfs_path_exists (ThunarVfsPath *path);
or some such function would be ideal.
- Is there any way of getting thumbnails with ThunarVFS? It seems to me that
thunar_vfs_get_custom_icon() should probably return the thumbnail for a
file if it exists (grepping the Thunar sources, it seems like it's currently
only used for trash and desktop files) or possibly a new function in
thunar-vfs could be implemented that wraps all the details of getting an
icon:
const gchar *thunar_vfs_path_load_icon(ThunarVfsPath *path);
Feel free to flame me for being blind and simply not seeing a function that
does exactly what I want =)
More information about the Thunar-dev
mailing list