aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaOS-DragonFly.cpp
diff options
context:
space:
mode:
authorwilliam <william.os4y@gmail.com>2015-03-24 22:06:18 +0100
committerwilliam <william.os4y@gmail.com>2015-03-24 22:06:18 +0100
commit5e43fa2b3831772bb3059df89c390496a249b729 (patch)
treeed744398026241b5411a99947da217a8cd2db0af /libLumina/LuminaOS-DragonFly.cpp
parentcreate FileSystemCapacity and put it in LuminaOS (diff)
downloadlumina-5e43fa2b3831772bb3059df89c390496a249b729.tar.gz
lumina-5e43fa2b3831772bb3059df89c390496a249b729.tar.bz2
lumina-5e43fa2b3831772bb3059df89c390496a249b729.zip
update FileSystemCapacity for Linux, Freebsd and DragonflyBSD
Diffstat (limited to 'libLumina/LuminaOS-DragonFly.cpp')
-rw-r--r--libLumina/LuminaOS-DragonFly.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libLumina/LuminaOS-DragonFly.cpp b/libLumina/LuminaOS-DragonFly.cpp
index 5fdd5e04..2e4ae358 100644
--- a/libLumina/LuminaOS-DragonFly.cpp
+++ b/libLumina/LuminaOS-DragonFly.cpp
@@ -178,6 +178,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
bgstack15