[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [PATCH] Make KDiskFreeSpace more convenient -> KJob-like usage
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2008-07-24 21:44:14
Message-ID: 200807242244.14512.huntedhacker () tiscali ! co ! uk
[Download RAW message or body]

On Thursday 24 July 2008 22:03:06 Sebastian Trüg wrote:
> The attached patch reverts my previous patch and marks the whole
> KDiskFreeSpace class deprecated (although that would not link here so I
> marked the methods).
> A new class takes its place that works 100% sync and has a rather nice API.
>
> May I commit?

Yes, that looks like a very nice way of doing it.

My only comments are on the API dox:

This class wraps around the system calls to detemermine the free space left in 
a specific partition.  It supports arbitrary paths and the mount point of the 
partition in question.

Instead, I'd put:

This class determines the free space left on the partition that holds a given 
path.  This path can be the mount point or any file or directory on the 
partition.

And instead of:

Usage is very simple through the one static method:

I'd have

To find how much space is available on the partition containing @p path, 
simply do the following:

Also, I'd note in the docs for each method that returns a KIO::filesize_t what 
units the return value is in.

Other than that (sorry, I'm a bit obsessive about apidocs), I think it looks 
great.

Alex



-- 
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic