From 5e43fa2b3831772bb3059df89c390496a249b729 Mon Sep 17 00:00:00 2001 From: william Date: Tue, 24 Mar 2015 22:06:18 +0100 Subject: update FileSystemCapacity for Linux, Freebsd and DragonflyBSD --- libLumina/LuminaOS-Linux.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libLumina/LuminaOS-Linux.cpp') diff --git a/libLumina/LuminaOS-Linux.cpp b/libLumina/LuminaOS-Linux.cpp index ab88b5d8..ecf0adeb 100644 --- a/libLumina/LuminaOS-Linux.cpp +++ b/libLumina/LuminaOS-Linux.cpp @@ -197,6 +197,10 @@ QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the inp //file system capacity QString LOS::FileSystemCapacity(QString dir) { //Return: percentage capacity as give by the df command - return QString; + QStringList mountInfo = LUtils::getCmdOutput("df " + dir); + QString::SectionFlag skipEmpty = QString::SectionSkipEmpty; + //we take the 5th word on the 2 line + QString capacity = mountInfo[1].section(" ",4,4, skipEmpty); + return capacity; } #endif -- cgit