Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qstorageinfo_linux.cpp File Reference
#include "qstorageinfo_linux_p.h"
#include "qdiriterator.h"
#include <private/qcore_unix_p.h>
#include <sys/statvfs.h>
+ Include dependency graph for qstorageinfo_linux.cpp:

Go to the source code of this file.

Macros

#define QT_STATFSBUF   struct statvfs
 
#define QT_STATFS   ::statvfs
 

Functions

static QString decodeFsEncString (const QString &str)
 
static QString retrieveLabel (const QByteArray &device)
 
static std::vector< MountInfo > parseMountInfo (FilterMountInfo filter=FilterMountInfo::All)
 

Macro Definition Documentation

◆ QT_STATFS

#define QT_STATFS   ::statvfs

Definition at line 27 of file qstorageinfo_linux.cpp.

◆ QT_STATFSBUF

#define QT_STATFSBUF   struct statvfs

Definition at line 26 of file qstorageinfo_linux.cpp.

Function Documentation

◆ decodeFsEncString()

static QString decodeFsEncString ( const QString str)
static

Definition at line 38 of file qstorageinfo_linux.cpp.

References QString::at(), i, QString::mid(), QString::reserve(), QString::size(), QString::sliced(), str, and QString::toInt().

Referenced by retrieveLabel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parseMountInfo()

static std::vector< MountInfo > parseMountInfo ( FilterMountInfo  filter = FilterMountInfo::All)
static

Definition at line 112 of file qstorageinfo_linux.cpp.

References QFileDevice::close(), doParseMountInfo(), file, QFile::open(), QIODevice::readAll(), QIODeviceBase::ReadOnly, and QIODeviceBase::Text.

+ Here is the call graph for this function:

◆ retrieveLabel()

static QString retrieveLabel ( const QByteArray device)
inlinestatic

Definition at line 62 of file qstorageinfo_linux.cpp.

References QFileInfo::canonicalFilePath(), decodeFsEncString(), QFile::decodeName(), device, QFileInfo::fileName(), QFileInfo::isSymLink(), it, QDir::NoDotAndDotDot, and QFileInfo::symLinkTarget().

+ Here is the call graph for this function: