Skip to content

PythonQt.QtCore.QStorageInfo · declarations 001

Back to PythonQt.QtCore.QStorageInfo

blockSize

blockSize() -> int

X.blockSize() -> int

Supplemental documentation: Qt 5 reference:

int QStorageInfo::blockSize() const

Returns the optimal transfer block size for this filesystem.

Returns -1 if QStorageInfo could not determine the size or if the QStorageInfo object is not valid.

This function was introduced in Qt 5.6.

Upstream PySide2 reference signatures (binding differences may apply):

blockSize(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#blockSize

bytesAvailable

bytesAvailable() -> int

X.bytesAvailable() -> int

Supplemental documentation: Qt 5 reference:

qint64 QStorageInfo::bytesAvailable() const

Returns the size (in bytes) available for the current user. It returns the total size available if the user is the root user or a system administrator.

This size can be less than or equal to the free size returned by bytesFree() function.

Returns -1 if QStorageInfo object is not valid.

See also bytesTotal() and bytesFree().

Upstream PySide2 reference signatures (binding differences may apply):

bytesAvailable(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#bytesAvailable

bytesFree

bytesFree() -> int

X.bytesFree() -> int

Supplemental documentation: Qt 5 reference:

qint64 QStorageInfo::bytesFree() const

Returns the number of free bytes in a volume. Note that if there are quotas on the filesystem, this value can be larger than the value returned by bytesAvailable().

Returns -1 if QStorageInfo object is not valid.

See also bytesTotal() and bytesAvailable().

Upstream PySide2 reference signatures (binding differences may apply):

bytesFree(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#bytesFree

bytesTotal

bytesTotal() -> int

X.bytesTotal() -> int

Supplemental documentation: Qt 5 reference:

qint64 QStorageInfo::bytesTotal() const

Returns the total volume size in bytes.

Returns -1 if QStorageInfo object is not valid.

See also bytesFree() and bytesAvailable().

Upstream PySide2 reference signatures (binding differences may apply):

bytesTotal(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#bytesTotal

device

device() -> Any

X.device() -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

QByteArray QStorageInfo::device() const

Returns the device for this volume.

For example, on Unix filesystems (including macOS), this returns the devpath like /dev/sda0 for local storages. On Windows, it returns the UNC path starting with \\\\?\\ for local storages (in other words, the volume GUID).

See also rootPath() and subvolume().

Upstream PySide2 reference signatures (binding differences may apply):

device(self) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#device

displayName

displayName() -> str

X.displayName() -> str

Supplemental documentation: Qt 5 reference:

QString QStorageInfo::displayName() const

Returns the volume's name, if available, or the root path if not.

Upstream PySide2 reference signatures (binding differences may apply):

displayName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#displayName

fileSystemType

fileSystemType() -> Any

X.fileSystemType() -> PythonQt.QtCore.QByteArray

Supplemental documentation: Qt 5 reference:

QByteArray QStorageInfo::fileSystemType() const

Returns the type name of the filesystem.

This is a platform-dependent function, and filesystem names can vary between different operating systems. For example, on Windows filesystems they can be named NTFS, and on Linux they can be named ntfs-3g or fuseblk.

See also name().

Upstream PySide2 reference signatures (binding differences may apply):

fileSystemType(self) -> PySide2.QtCore.QByteArray

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#fileSystemType

isReadOnly

isReadOnly() -> bool

X.isReadOnly() -> bool

Supplemental documentation: Qt 5 reference:

bool QStorageInfo::isReadOnly() const

Returns true if the current filesystem is protected from writing; false otherwise.

Upstream PySide2 reference signatures (binding differences may apply):

isReadOnly(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#isReadOnly

isReady

isReady() -> bool

X.isReady() -> bool

Supplemental documentation: Qt 5 reference:

bool QStorageInfo::isReady() const

Returns true if the current filesystem is ready to work; false otherwise. For example, false is returned if the CD volume is not inserted.

Note that fileSystemType(), name(), bytesTotal(), bytesFree(), and bytesAvailable() will return invalid data until the volume is ready.

See also isValid().

Upstream PySide2 reference signatures (binding differences may apply):

isReady(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#isReady

isRoot

isRoot() -> bool

X.isRoot() -> bool

Supplemental documentation: Qt 5 reference:

bool QStorageInfo::isRoot() const

Returns true if this QStorageInfo represents the system root volume; false otherwise.

On Unix filesystems, the root volume is a volume mounted on /. On Windows, the root volume is the volume where the OS is installed.

See also root().

Upstream PySide2 reference signatures (binding differences may apply):

isRoot(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#isRoot

isValid

isValid() -> bool

X.isValid() -> bool

Supplemental documentation: Qt 5 reference:

bool QStorageInfo::isValid() const

Returns true if the QStorageInfo specified by rootPath exists and is mounted correctly.

See also isReady().

Upstream PySide2 reference signatures (binding differences may apply):

isValid(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#isValid

mountedVolumes

mountedVolumes() -> tuple

X.mountedVolumes() -> tuple

Supplemental documentation: Qt 5 reference:

[static] QList\<QStorageInfo> QStorageInfo::mountedVolumes()

Returns the list of QStorageInfo objects that corresponds to the list of currently mounted filesystems.

On Windows, this returns the drives visible in the My Computer folder. On Unix operating systems, it returns the list of all mounted filesystems (except for pseudo filesystems).

Returns all currently mounted filesystems by default.

The example shows how to retrieve all available filesystems, skipping read-only ones.

    foreach (const QStorageInfo &storage, QStorageInfo::mountedVolumes()) {
        if (storage.isValid() && storage.isReady()) {
            if (!storage.isReadOnly()) {
                // ...
            }
        }
    }

See also root().

Upstream PySide2 reference signatures (binding differences may apply):

mountedVolumes() -> typing.List[PySide2.QtCore.QStorageInfo]

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#mountedVolumes

name

name() -> str

X.name() -> str

Supplemental documentation: Qt 5 reference:

QString QStorageInfo::name() const

Returns the human-readable name of a filesystem, usually called label.

Not all filesystems support this feature. In this case, the value returned by this method could be empty. An empty string is returned if the file system does not support labels, or if no label is set.

On Linux, retrieving the volume's label requires udev to be present in the system.

See also fileSystemType().

Upstream PySide2 reference signatures (binding differences may apply):

name(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#name

operator_assign

operator_assign(other: Any) -> Any

X.operator_assign(other) -> PythonQt.QtCore.QStorageInfo

refresh

refresh() -> None

X.refresh()

Supplemental documentation: Qt 5 reference:

void QStorageInfo::refresh()

Resets QStorageInfo's internal cache.

QStorageInfo caches information about storage to speed up performance. QStorageInfo retrieves information during object construction and/or when calling the setPath() method. You have to manually reset the cache by calling this function to update storage information.

Upstream PySide2 reference signatures (binding differences may apply):

refresh(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#refresh

root

root() -> Any

X.root() -> PythonQt.QtCore.QStorageInfo

Supplemental documentation: Qt 5 reference:

[static] QStorageInfo QStorageInfo::root()

Returns a QStorageInfo object that represents the system root volume.

On Unix systems this call returns the root ('/') volume; in Windows the volume where the operating system is installed.

See also isRoot().

Upstream PySide2 reference signatures (binding differences may apply):

root() -> PySide2.QtCore.QStorageInfo

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#root

rootPath

rootPath() -> str

X.rootPath() -> str

Supplemental documentation: Qt 5 reference:

QString QStorageInfo::rootPath() const

Returns the mount point of the filesystem this QStorageInfo object represents.

On Windows, it returns the volume letter in case the volume is not mounted to a directory.

Note that the value returned by rootPath() is the real mount point of a volume, and may not be equal to the value passed to the constructor or setPath() method. For example, if you have only the root volume in the system, and pass '/directory' to setPath(), then this method will return '/'.

See also setPath() and device().

Upstream PySide2 reference signatures (binding differences may apply):

rootPath(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#rootPath

setPath

setPath(path: str) -> None

X.setPath(path)

Supplemental documentation: Qt 5 reference:

void QStorageInfo::setPath(const QString \&path)

Sets this QStorageInfo object to the filesystem mounted where path is located.

path can either be a root path of the filesystem, a directory, or a file within that filesystem.

See also rootPath().

Upstream PySide2 reference signatures (binding differences may apply):

setPath(self, path: str) -> None

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#setPath

swap

swap(other: Any) -> None

X.swap(other)

Supplemental documentation: Qt 5 reference:

void QStorageInfo::swap(QStorageInfo \&other)

Swaps this volume info with other. This function is very fast and never fails.

Upstream PySide2 reference signatures (binding differences may apply):

swap(self, other: PySide2.QtCore.QStorageInfo) -> None

Source: https://doc.qt.io/archives/qt-5.15/qstorageinfo.html#swap