diff options
author | Ken Moore <moorekou@gmail.com> | 2015-03-26 15:22:21 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-03-26 15:22:21 -0400 |
commit | f6891cc964fb3f2b1e769be0aa9b24219cac79c1 (patch) | |
tree | 6eda92367dc7e22f701b070d14b28ed82163934d /libLumina/LuminaOS-OpenBSD.cpp | |
parent | Actually move the file/dir copy onto itself check earlier in the procedure, t... (diff) | |
parent | Merge remote-tracking branch 'upstream/master' into fmNumbers (diff) | |
download | lumina-f6891cc964fb3f2b1e769be0aa9b24219cac79c1.tar.gz lumina-f6891cc964fb3f2b1e769be0aa9b24219cac79c1.tar.bz2 lumina-f6891cc964fb3f2b1e769be0aa9b24219cac79c1.zip |
Merge pull request #77 from william-os4y/fmNumbers
include some information about the files in the statusbar
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..dc8df0a7 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 |