Skip to content

PythonQt.QtCore.QFileDevice · declarations 001

Back to PythonQt.QtCore.QFileDevice

aboutToClose

aboutToClose(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.aboutToClose; argument details are not documented.

atEnd

atEnd() -> bool

X.atEnd() -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QFileDevice::atEnd() const

Reimplements: QIODevice::atEnd() const.

Returns true if the end of the file has been reached; otherwise returns false.

For regular empty files on Unix (e.g. those in /proc), this function returns true, since the file system reports that the size of such a file is 0. Therefore, you should not depend on atEnd() when reading data from such a file, but rather call read() until no more data can be read.

Upstream PySide2 reference signatures (binding differences may apply):

atEnd(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#atEnd

bytesWritten

bytesWritten(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.bytesWritten; argument details are not documented.

channelBytesWritten

channelBytesWritten(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.channelBytesWritten; argument details are not documented.

channelReadyRead

channelReadyRead(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.channelReadyRead; argument details are not documented.

close

close() -> None

X.close()

Supplemental documentation: Qt 5 reference:

[override virtual] void QFileDevice::close()

Reimplements: QIODevice::close().

Calls QFileDevice::flush() and closes the file. Errors from flush are ignored.

See also QIODevice::close().

Upstream PySide2 reference signatures (binding differences may apply):

close(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#close

destroyed

destroyed(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.destroyed; argument details are not documented.

error

error() -> Any

X.error()

Supplemental documentation: Qt 5 reference:

QFileDevice::FileError QFileDevice::error() const

Returns the file error status.

The I/O device status returns an error code. For example, if open() returns false, or a read/write operation returns -1, this function can be called to find out the reason why the operation failed.

See also unsetError().

Upstream PySide2 reference signatures (binding differences may apply):

error(self) -> PySide2.QtCore.QFileDevice.FileError

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#error

fileName

fileName() -> str

X.fileName() -> str

Supplemental documentation: Qt 5 reference:

[virtual] QString QFileDevice::fileName() const

Returns the name of the file. The default implementation in QFileDevice returns a null string.

Upstream PySide2 reference signatures (binding differences may apply):

fileName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#fileName

flush

flush() -> bool

X.flush() -> bool

Supplemental documentation: Qt 5 reference:

bool QFileDevice::flush()

Flushes any buffered data to the file. Returns true if successful; otherwise returns false.

Upstream PySide2 reference signatures (binding differences may apply):

flush(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#flush

handle

handle() -> int

X.handle() -> int

Supplemental documentation: Qt 5 reference:

int QFileDevice::handle() const

Returns the file handle of the file.

This is a small positive integer, suitable for use with C library functions such as fdopen() and fcntl(). On systems that use file descriptors for sockets (i.e. Unix systems, but not Windows) the handle can be used with QSocketNotifier as well.

If the file is not open, or there is an error, handle() returns -1.

See also QSocketNotifier.

Upstream PySide2 reference signatures (binding differences may apply):

handle(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#handle

isSequential

isSequential() -> bool

X.isSequential() -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QFileDevice::isSequential() const

Reimplements: QIODevice::isSequential() const.

Returns true if the file can only be manipulated sequentially; otherwise returns false.

Most files support random-access, but some special files may not.

See also QIODevice::isSequential().

Upstream PySide2 reference signatures (binding differences may apply):

isSequential(self) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#isSequential

map

map(offset: int, size: int, arg2: flags) -> str

X.map(offset, size, flags) -> int

Supplemental documentation: Qt 5 reference:

uchar *QFileDevice::map(qint64 offset, qint64 size, QFileDevice::MemoryMapFlags flags \= NoOptions)

Maps size bytes of the file into memory starting at offset. A file should be open for a map to succeed but the file does not need to stay open after the memory has been mapped. When the QFile is destroyed or a new file is opened with this object, any maps that have not been unmapped will automatically be unmapped.

The mapping will have the same open mode as the file (read and/or write), except when using MapPrivateOption, in which case it is always possible to write to the mapped memory.

Any mapping options can be passed through flags.

Returns a pointer to the memory or nullptr if there is an error.

See also unmap().

Upstream PySide2 reference signatures (binding differences may apply):

map(self, offset: int, size: int, flags: PySide2.QtCore.QFileDevice.MemoryMapFlags=...) -> str

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#map

objectNameChanged

objectNameChanged(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.objectNameChanged; argument details are not documented.

open

open(mode: Any) -> bool

X.open(mode) -> bool

permissions

permissions() -> Any

X.permissions()

Supplemental documentation: Qt 5 reference:

[virtual] QFileDevice::Permissions QFileDevice::permissions() const

Returns the complete OR-ed together combination of QFile::Permission for the file.

See also setPermissions().

Upstream PySide2 reference signatures (binding differences may apply):

permissions(self) -> PySide2.QtCore.QFileDevice.Permissions

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#permissions

pos

pos() -> int

X.pos() -> int

Supplemental documentation: Qt 5 reference:

[override virtual] qint64 QFileDevice::pos() const

Reimplements: QIODevice::pos() const.

Upstream PySide2 reference signatures (binding differences may apply):

pos(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#pos

readChannelFinished

readChannelFinished(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.readChannelFinished; argument details are not documented.

readData

readData(data: str, maxlen: int) -> int

X.readData(data, maxlen) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] qint64 QFileDevice::readData(char *data, qint64 len)

Reimplements: QIODevice::readData(char *data, qint64 maxSize).

Upstream PySide2 reference signatures (binding differences may apply):

readData(self, data: str, maxlen: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#readData

readLineData

readLineData(data: str, maxlen: int) -> int

X.readLineData(data, maxlen) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] qint64 QFileDevice::readLineData(char *data, qint64 maxlen)

Reimplements: QIODevice::readLineData(char *data, qint64 maxSize).

Upstream PySide2 reference signatures (binding differences may apply):

readLineData(self, data: str, maxlen: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#readLineData

readyRead

readyRead(*args: Any, **kwargs: Any) -> Any

Native PythonQt.QtCore.QFileDevice.readyRead; argument details are not documented.

resize

resize(sz: int) -> bool

X.resize(sz) -> bool

Supplemental documentation: Qt 5 reference:

[virtual] bool QFileDevice::resize(qint64 sz)

Sets the file size (in bytes) sz. Returns true if the resize succeeds; false otherwise. If sz is larger than the file currently is, the new bytes will be set to 0; if sz is smaller, the file is simply truncated.

Warning: This function can fail if the file doesn't exist.

See also size().

Upstream PySide2 reference signatures (binding differences may apply):

resize(self, sz: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#resize

seek

seek(offset: int) -> bool

X.seek(offset) -> bool

Supplemental documentation: Qt 5 reference:

[override virtual] bool QFileDevice::seek(qint64 pos)

Reimplements: QIODevice::seek(qint64 pos).

For random-access devices, this function sets the current position to pos, returning true on success, or false if an error occurred. For sequential devices, the default behavior is to do nothing and return false.

Seeking beyond the end of a file: If the position is beyond the end of a file, then seek() will not immediately extend the file. If a write is performed at this position, then the file will be extended. The content of the file between the previous end of file and the newly written data is UNDEFINED and varies between platforms and file systems.

Upstream PySide2 reference signatures (binding differences may apply):

seek(self, offset: int) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#seek

setPermissions

setPermissions(permissionSpec: Any) -> bool

X.setPermissions(permissionSpec) -> bool

Supplemental documentation: Qt 5 reference:

[virtual] bool QFileDevice::setPermissions(QFileDevice::Permissions permissions)

Sets the permissions for the file to the permissions specified. Returns true if successful, or false if the permissions cannot be modified.

Warning: This function does not manipulate ACLs, which may limit its effectiveness.

See also permissions().

Upstream PySide2 reference signatures (binding differences may apply):

setPermissions(self, permissionSpec: PySide2.QtCore.QFileDevice.Permissions) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#setPermissions

size

size() -> int

X.size() -> int

Supplemental documentation: Qt 5 reference:

[override virtual] qint64 QFileDevice::size() const

Reimplements: QIODevice::size() const.

Returns the size of the file.

For regular empty files on Unix (e.g. those in /proc), this function returns 0; the contents of such a file are generated on demand in response to you calling read().

Upstream PySide2 reference signatures (binding differences may apply):

size(self) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#size

unmap

unmap(address: str) -> bool

X.unmap(address) -> bool

Supplemental documentation: Qt 5 reference:

bool QFileDevice::unmap(uchar *address)

Unmaps the memory address.

Returns true if the unmap succeeds; false otherwise.

See also map().

Upstream PySide2 reference signatures (binding differences may apply):

unmap(self, address: str) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#unmap

unsetError

unsetError() -> None

X.unsetError()

Supplemental documentation: Qt 5 reference:

void QFileDevice::unsetError()

Sets the file's error to QFileDevice::NoError.

See also error().

Upstream PySide2 reference signatures (binding differences may apply):

unsetError(self) -> None

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#unsetError

writeData

writeData(data: str, len: int) -> int

X.writeData(data, len) -> int

Supplemental documentation: Qt 5 reference:

[override virtual protected] qint64 QFileDevice::writeData(const char *data, qint64 len)

Reimplements: QIODevice::writeData(const char *data, qint64 maxSize).

Upstream PySide2 reference signatures (binding differences may apply):

writeData(self, data: str, len: int) -> int

Source: https://doc.qt.io/archives/qt-5.15/qfiledevice.html#writeData