PythonQt.QtCore.QStorageInfo
QStorageInfo
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
Allows retrieving information about the volume's space, its mount point, label, and filesystem name.
You can create an instance of QStorageInfo by passing the path to the volume's mount point as a constructor parameter, or you can set it using the setPath() method. The static mountedVolumes() method can be used to get the list of all mounted filesystems.
QStorageInfo always caches the retrieved information, but you can call refresh() to invalidate the cache.
The following example retrieves the most common information about the root volume of the system, and prints information about it.
QStorageInfo storage = QStorageInfo::root();
qDebug() << storage.rootPath();
if (storage.isReadOnly())
qDebug() << "isReadOnly:" << storage.isReadOnly();
qDebug() << "name:" << storage.name();
qDebug() << "fileSystemType:" << storage.fileSystemType();
qDebug() << "size:" << storage.bytesTotal()/1000/1000 << "MB";
qDebug() << "availableSize:" << storage.bytesAvailable()/1000/1000 << "MB";
Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
blockSize |
function | (self) -> int |
X.blockSize() -> int |
bytesAvailable |
function | (self) -> int |
X.bytesAvailable() -> int |
bytesFree |
function | (self) -> int |
X.bytesFree() -> int |
bytesTotal |
function | (self) -> int |
X.bytesTotal() -> int |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
device |
function | (self) -> Any |
X.device() -> PythonQt.QtCore.QByteArray |
displayName |
function | (self) -> str |
X.displayName() -> str |
fileSystemType |
function | (self) -> Any |
X.fileSystemType() -> PythonQt.QtCore.QByteArray |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
isReadOnly |
function | (self) -> bool |
X.isReadOnly() -> bool |
isReady |
function | (self) -> bool |
X.isReady() -> bool |
isRoot |
function | (self) -> bool |
X.isRoot() -> bool |
isValid |
function | (self) -> bool |
X.isValid() -> bool |
mountedVolumes |
function | (self) -> tuple |
X.mountedVolumes() -> tuple |
name |
function | (self) -> str |
X.name() -> str |
operator_assign |
function | (self, other: Any) -> Any |
X.operator_assign(other) -> PythonQt.QtCore.QStorageInfo |
refresh |
function | (self) -> None |
Resets [QStorageInfo](https://doc.qt.io/archives/qt-5.15/qstorageinfo.html)'s internal cache. |
root |
function | (self) -> Any |
X.root() -> PythonQt.QtCore.QStorageInfo |
rootPath |
function | (self) -> str |
X.rootPath() -> str |
setPath |
function | (self, path: str) -> None |
Sets this [QStorageInfo](https://doc.qt.io/archives/qt-5.15/qstorageinfo.html) object to the filesystem mounted where path is located. |
swap |
function | (self, other: Any) -> None |
Swaps this volume info with other. |