[Thunar-dev] show total directory sizes?

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Fri Mar 24 00:08:48 CET 2006


Jani Monoses wrote:
> Hello Benedikt
> 
> It would be nice if properties on a directory showed its total size 
> (maybe even the number of files) as it is (was?) the case in Windows 
> Explorer and in Nautilus.
> 
> Unless you think this is best implemented outside the thunar or it is an 
> unnecessary feature here's what I think:
> 
> There needs to be either a new function or modifying thunar_vfs_scandir 
> which would take an extra callback function parameter.
> The latter would be called with each VfsInfo found, mainly to present an
> indication of progress, since when vfs_scandir is called recursively it
> can take a long time. This may be even used for recursive chmod/chown 
> operation to give the user some feedback on progress.
> 
> A new vfs-dirsize-job would call this function and have an 'update' 
> signal just like interactive jobs have 'percent', and it would be 
> emitted when the accumulated size increases with a specific amount (say 
> 1M) and at the end, so the properties dialog has an up-to-date dirsize
> label displayed. It need no be emmitted on every new vfsinfo since it
> would be too much overhead, hence the reason for the new callback 
> function in the vfs_scandir variant.
> 
> So in case we want to get directory size in a friendlier way than
> putting sh -c "zenity --info --text \"  `du -hs %f | cut -f 1`\""
> in a UCA script does the above plan seem ok to you?
> 
> I'd lean towards modifying vfs_scandir to add the extra param instead of
> duplicating most of the function. This way current callers would just 
> pass a NULL as the callback, but maybe other recursive callers could use
> it.

Can you file a bug report to remind me of this?

> thanks
> Jani

Benedikt



More information about the Thunar-dev mailing list