Re: [Tracker] directory sizes



Peter Rullmann wrote:
Hi,

I'm writing a general purpose filesystem browser which uses tracker
and could need some fast way of getting the size of a directory.
Ideally as fast as getting the size of a file.

By size of directory do you mean recursive size of all its contents?

if so thats easy to do in sql so I could create a dbus method for that


Wouldn't it be possible to add this to tracker. Tracker allways knows
when a file size changes, so why not adding the size difference to all
directories up the hierarchy, when this happens.

COuld do but not sure whether size should be no of items in the folder or the cummulative size. Either way we can easily and quickly calculate both at runtime


This would make tracker ideal for filesystem housekeeping tools. These
could instantly show the 20 biggest files and directories or could
generate views like SequoiaView. And this without statting the whole
sub-tree.

yes - will look at this at some point. I do want to write a next generation file manager for tracker but will have to wait until GVFS is done.

--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/




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