13 QStorageInfo storage(qApp->applicationDirPath());
14 if (storage.isValid() && storage.isReady()) {
22 foreach (
const QStorageInfo &storage, QStorageInfo::mountedVolumes()) {
23 if (storage.isValid() && storage.isReady()) {
24 if (!storage.isReadOnly()) {
34 QStorageInfo storage = QStorageInfo::root();
36 qDebug() << storage.rootPath();
37 if (storage.isReadOnly())
38 qDebug() <<
"isReadOnly:" << storage.isReadOnly();
40 qDebug() <<
"name:" << storage.name();
41 qDebug() <<
"fileSystemType:" << storage.fileSystemType();
42 qDebug() <<
"size:" << storage.bytesTotal()/1000/1000 <<
"MB";
43 qDebug() <<
"availableSize:" << storage.bytesAvailable()/1000/1000 <<
"MB";