Qt-interest Archive, August 2007
How to find available free disk space?
Message 1 in thread
Hi,
I need to find the available free disk space from a multi-platform Qt
program. I haven't found a Qt based solution yet, so I am using platform
dependent calls. I can use GetDiskFreeSpaceEx() on Windows to find available
free disk space, I found solutions for some Linux variants, but I do not
know how to find it on Mac OS X.
Is there a platform independent way in Qt to find the available free disk
space?
Thank you,
Csaba
--
[ signature omitted ]
Message 2 in thread
Try man statvfs on OSX.
On 8/3/07, Csaba Chris Gyulai <csaba@xxxxxxxx> wrote:
> Hi,
>
> I need to find the available free disk space from a multi-platform Qt
> program. I haven't found a Qt based solution yet, so I am using platform
> dependent calls. I can use GetDiskFreeSpaceEx() on Windows to find available
> free disk space, I found solutions for some Linux variants, but I do not
> know how to find it on Mac OS X.
>
> Is there a platform independent way in Qt to find the available free disk
> space?
>
> Thank you,
> Csaba
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 3 in thread
>
>
> > Is there a platform independent way in Qt to find the available free
> disk
> > space?
> >
> > Thank you,
> > Csaba
> >
>
Sorry not sure about Qt. However, use boost's filesystem library.
Cross-platform and amazing:
http://www.boost.org/libs/filesystem/doc/index.htm
The function you would use is boost::filesystem::space(Path const & p);
Chris
--
[ signature omitted ]