diff options
author | wi <william.os4y@gmail.com> | 2015-04-12 22:21:19 +0200 |
---|---|---|
committer | wi <william.os4y@gmail.com> | 2015-04-12 22:21:19 +0200 |
commit | b26a12931cc2488359cc2bd26e508a01efded9d5 (patch) | |
tree | b27468f3aa3d79b878a7881934bbbc50ca158474 /libLumina/LuminaOS-OpenBSD.cpp | |
parent | refactring of lumina-fileinfo: (diff) | |
parent | Fix location of ogg / vorbis gstreamer plugins (diff) | |
download | lumina-b26a12931cc2488359cc2bd26e508a01efded9d5.tar.gz lumina-b26a12931cc2488359cc2bd26e508a01efded9d5.tar.bz2 lumina-b26a12931cc2488359cc2bd26e508a01efded9d5.zip |
Merge remote-tracking branch 'upstream/master' into deskEditor
Diffstat (limited to 'libLumina/LuminaOS-OpenBSD.cpp')
-rw-r--r-- | libLumina/LuminaOS-OpenBSD.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libLumina/LuminaOS-OpenBSD.cpp b/libLumina/LuminaOS-OpenBSD.cpp index b6996795..df6ddeba 100644 --- a/libLumina/LuminaOS-OpenBSD.cpp +++ b/libLumina/LuminaOS-OpenBSD.cpp @@ -207,4 +207,19 @@ QStringList LOS::Checksums(QStringList filepaths){ //Return: checksum of the inp } return info; } + +//file system capacity +QString LOS::FileSystemCapacity(QString dir) { + // on OpenBSD, df has the following layout: + //>df /home/wi + //>Filesystem 512-blocks Used Avail Capacity Mounted on + //>/dev/sd2l 14334588 739900 12877960 5% /home + + 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 |