[Qt-interest] Qt show folder size
Arnold Krille
arnold at arnoldarts.de
Fri Sep 18 15:20:25 CEST 2009
On Friday 18 September 2009 14:17:56 Andrei Sebastian Cimpean wrote:
> On Friday 18 September 2009 02:52:28 pm Sean Harmer wrote:
> > On Friday 18 Sep 2009 12:09:02 Andrei Sebastian Cimpean wrote:
> > > This returns a standard size around 4 kb:
> > > QString::number(fileorfolder.size(),10)
> > > Does anyone know how to get the sum of all the items inside the folder?
> > Yes, iterate through them and sum the sizes. Should be trivial with
> > QDirIterator and QFileInfo.
> How fast is this way of doing it? I mean for a folder with 100k the number
> of subfolders and files wouldn't it take ages?
Show me a file-system where you can traverse 100k of sub-folders really fast.
From my experience, normal "ls -R" works slow on ext3 and _very_ _ultra_
_sloooww_ on fat*...
Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090918/d295fdec/attachment.bin
More information about the Qt-interest-old
mailing list