Monitoring free space



Hey,

gtk-app-devel-list might be the better place for it but I'll try asking
here first. Hope that's ok.

One thing that stopped working in the Thunar file manager after I
ported it to GIO instead of ThunarVFS is that the free space in the
status bar and properties dialog is no longer updated properly. The
reason for this is that prior to this, file change events were emitted
by ThunarVFS whenever the free space on the device changed (at least
that's what I assume because the progress dialog label was only updated
on file change events).

So, I wonder what the easiest way to monitor the free space on a device
is (assuming that we have a GFile for a file or directory and the free
space we're interested in is that of the volume/mount the file/directory
is located on)?

There is g_file_get_filesystem_info() but that information cannot be
monitored. There are no file change events emitted from the
GFileMonitor of files/dirs when the free space of their enclosing
volume/mount changes. So, my next idea would be to listen to
the "changed" signal of enclosing volumes/mounts? But is this the
correct/best way and does it work at all?

Any help and information is welcome, I really am a bit puzzled here.

Cheers,
Jannis

Attachment: signature.asc
Description: PGP signature



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