![]() |
Qt 6.x
The Qt SDK
|
#include <qfsfileengine_p.h>
Inheritance diagram for QFSFileEnginePrivate:
Collaboration diagram for QFSFileEnginePrivate:Classes | |
| struct | StartAndLength |
Public Types | |
| enum | LastIOCommand { IOFlushCommand , IOReadCommand , IOWriteCommand } |
Public Member Functions | |
| bool | nativeOpen (QIODevice::OpenMode openMode, std::optional< QFile::Permissions > permissions) |
| bool | openFh (QIODevice::OpenMode flags, FILE *fh) |
| Opens the file handle fh using the open mode flags. | |
| bool | openFd (QIODevice::OpenMode flags, int fd) |
| Opens the file descriptor fd to the file engine, using the open mode flags. | |
| bool | nativeClose () |
| bool | closeFdFh () |
| bool | nativeFlush () |
| bool | nativeSyncToDisk () |
| bool | flushFh () |
| qint64 | nativeSize () const |
| qint64 | sizeFdFh () const |
| qint64 | nativePos () const |
| qint64 | posFdFh () const |
| bool | nativeSeek (qint64) |
| bool | seekFdFh (qint64) |
| qint64 | nativeRead (char *data, qint64 maxlen) |
| qint64 | readFdFh (char *data, qint64 maxlen) |
| qint64 | nativeReadLine (char *data, qint64 maxlen) |
| qint64 | readLineFdFh (char *data, qint64 maxlen) |
| qint64 | nativeWrite (const char *data, qint64 len) |
| qint64 | writeFdFh (const char *data, qint64 len) |
| int | nativeHandle () const |
| bool | nativeIsSequential () const |
| bool | isSequentialFdFh () const |
| uchar * | map (qint64 offset, qint64 size, QFile::MemoryMapFlags flags) |
| bool | unmap (uchar *ptr) |
| void | unmapAll () |
| bool | doStat (QFileSystemMetaData::MetaDataFlags flags=QFileSystemMetaData::PosixStatFlags) const |
| bool | isSymlink () const |
Public Member Functions inherited from QAbstractFileEnginePrivate | |
| QAbstractFileEnginePrivate () | |
| virtual | ~QAbstractFileEnginePrivate () |
Static Public Member Functions | |
| static bool | openModeCanCreate (QIODevice::OpenMode openMode) |
Public Attributes | |
| QFileSystemEntry | fileEntry |
| QIODevice::OpenMode | openMode |
| QFileSystemMetaData | metaData |
| FILE * | fh |
| QHash< uchar *, StartAndLength > | maps |
| int | fd |
| LastIOCommand | lastIOCommand |
| bool | lastFlushFailed |
| bool | closeFileHandle |
| uint | is_sequential: 2 |
| uint | tried_stat: 1 |
| uint | need_lstat: 1 |
| uint | is_link: 1 |
Public Attributes inherited from QAbstractFileEnginePrivate | |
| QFile::FileError | fileError |
| QString | errorString |
| QAbstractFileEngine * | q_ptr |
Protected Member Functions | |
| QFSFileEnginePrivate () | |
| void | init () |
| QAbstractFileEngine::FileFlags | getPermissions (QAbstractFileEngine::FileFlags type) const |
Definition at line 115 of file qfsfileengine_p.h.
| Enumerator | |
|---|---|
| IOFlushCommand | |
| IOReadCommand | |
| IOWriteCommand | |
Definition at line 179 of file qfsfileengine_p.h.
|
protected |
Definition at line 80 of file qfsfileengine.cpp.
References init().
Here is the call graph for this function:| bool QFSFileEnginePrivate::closeFdFh | ( | ) |
Definition at line 363 of file qfsfileengine.cpp.
References closeFileHandle, fh, lastFlushFailed, QT_CLOSE, ret, QSystemError::stdString(), tried_stat, and QFileDevice::UnspecifiedError.
Referenced by nativeClose().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QFSFileEnginePrivate::doStat | ( | QFileSystemMetaData::MetaDataFlags | flags = QFileSystemMetaData::PosixStatFlags | ) | const |
Definition at line 315 of file qfsfileengine_unix.cpp.
References QFileSystemMetaData::exists(), fd, fh, fileEntry, QFileSystemEngine::fillMetaData(), QFileSystemMetaData::hasFlags(), QFileSystemEntry::isEmpty(), metaData, QFileSystemMetaData::missingFlags(), and tried_stat.
Referenced by map(), and sizeFdFh().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QFSFileEnginePrivate::flushFh | ( | ) |
Definition at line 433 of file qfsfileengine.cpp.
References fh, IOFlushCommand, lastFlushFailed, lastIOCommand, QFileDevice::ResourceError, ret, QSystemError::stdString(), and QFileDevice::WriteError.
Referenced by nativeFlush().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
|
protected |
Definition at line 88 of file qfsfileengine.cpp.
References closeFileHandle, fh, INVALID_FILE_ATTRIBUTES, IOFlushCommand, is_link, is_sequential, lastFlushFailed, lastIOCommand, need_lstat, QIODeviceBase::NotOpen, openMode, and tried_stat.
Referenced by QFSFileEnginePrivate().
Here is the caller graph for this function:| bool QFSFileEnginePrivate::isSequentialFdFh | ( | ) | const |
| bool QFSFileEnginePrivate::isSymlink | ( | ) | const |
Definition at line 333 of file qfsfileengine_unix.cpp.
References fileEntry, QFileSystemEngine::fillMetaData(), QFileSystemMetaData::hasFlags(), QFileSystemMetaData::isLink(), QFileSystemMetaData::LinkType, and metaData.
Here is the call graph for this function:Definition at line 547 of file qfsfileengine_unix.cpp.
References doStat(), MAP_FAILED, QFileDevice::MapPrivateOption, maps, metaData, nativeHandle(), QIODeviceBase::NotOpen, openMode, QFileDevice::PermissionsError, Q_INT64_C, qMin(), qt_error_string(), qWarning, QIODeviceBase::ReadOnly, QFileDevice::ResourceError, QFileSystemMetaData::size(), QFileSystemMetaData::SizeAttribute, QFileDevice::UnspecifiedError, and QIODeviceBase::WriteOnly.
Here is the call graph for this function:| bool QFSFileEnginePrivate::nativeClose | ( | ) |
Definition at line 140 of file qfsfileengine_unix.cpp.
References closeFdFh().
Here is the call graph for this function:| bool QFSFileEnginePrivate::nativeFlush | ( | ) |
| int QFSFileEnginePrivate::nativeHandle | ( | ) | const |
Definition at line 268 of file qfsfileengine_unix.cpp.
Referenced by map(), and nativeSyncToDisk().
Here is the caller graph for this function:| bool QFSFileEnginePrivate::nativeIsSequential | ( | ) | const |
Definition at line 276 of file qfsfileengine_unix.cpp.
References isSequentialFdFh().
Referenced by nativeRead().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QFSFileEnginePrivate::nativeOpen | ( | QIODevice::OpenMode | openMode, |
| std::optional< QFile::Permissions > | permissions | ||
| ) |
Definition at line 75 of file qfsfileengine_unix.cpp.
References openMode.
| qint64 QFSFileEnginePrivate::nativePos | ( | ) | const |
Definition at line 252 of file qfsfileengine_unix.cpp.
References posFdFh().
Here is the call graph for this function:Definition at line 175 of file qfsfileengine_unix.cpp.
References fh, i, nativeIsSequential(), qt_error_string(), read(), QFileDevice::ReadError, and readFdFh().
Here is the call graph for this function:Definition at line 236 of file qfsfileengine_unix.cpp.
References readLineFdFh().
Here is the call graph for this function:| bool QFSFileEnginePrivate::nativeSeek | ( | qint64 | pos | ) |
Definition at line 260 of file qfsfileengine_unix.cpp.
References pos, and seekFdFh().
Here is the call graph for this function:| qint64 QFSFileEnginePrivate::nativeSize | ( | ) | const |
Definition at line 292 of file qfsfileengine_unix.cpp.
References sizeFdFh().
Here is the call graph for this function:| bool QFSFileEnginePrivate::nativeSyncToDisk | ( | ) |
Definition at line 158 of file qfsfileengine_unix.cpp.
References EINTR_LOOP, nativeHandle(), qt_error_string(), ret, and QFileDevice::WriteError.
Here is the call graph for this function:Definition at line 244 of file qfsfileengine_unix.cpp.
References writeFdFh().
Here is the call graph for this function:| bool QFSFileEnginePrivate::openFd | ( | QIODevice::OpenMode | flags, |
| int | fd | ||
| ) |
Opens the file descriptor fd to the file engine, using the open mode flags.
Definition at line 323 of file qfsfileengine.cpp.
References QIODeviceBase::Append, fd, fh, QIODeviceBase::NotOpen, QFileDevice::OpenError, openMode, QFileDevice::ResourceError, ret, and QSystemError::stdString().
Here is the call graph for this function:| bool QFSFileEnginePrivate::openFh | ( | QIODevice::OpenMode | flags, |
| FILE * | fh | ||
| ) |
Opens the file handle fh using the open mode flags.
Definition at line 258 of file qfsfileengine.cpp.
References QIODeviceBase::Append, fh, QIODeviceBase::NotOpen, QFileDevice::OpenError, openMode, Q_ASSERT_X, QFileDevice::ResourceError, ret, QSystemError::stdString(), and QIODeviceBase::Unbuffered.
Here is the call graph for this function:
|
inlinestatic |
Definition at line 205 of file qfsfileengine_p.h.
References QIODeviceBase::ExistingOnly, and QIODeviceBase::WriteOnly.
Referenced by openModeToOpenFlags().
Here is the caller graph for this function:| qint64 QFSFileEnginePrivate::posFdFh | ( | ) | const |
Definition at line 505 of file qfsfileengine.cpp.
References fh.
Referenced by nativePos().
Here is the caller graph for this function:Definition at line 608 of file qfsfileengine.cpp.
References fh, QT_READ, QFileDevice::ReadError, and QSystemError::stdString().
Referenced by nativeRead().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 686 of file qfsfileengine.cpp.
References fh, qstrlen(), QFileDevice::ReadError, and QSystemError::stdString().
Referenced by nativeReadLine().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QFSFileEnginePrivate::seekFdFh | ( | qint64 | pos | ) |
Definition at line 543 of file qfsfileengine.cpp.
References fh, IOFlushCommand, lastIOCommand, pos, QFileDevice::PositionError, qWarning, QFileDevice::ReadError, ret, and QSystemError::stdString().
Referenced by nativeSeek().
Here is the call graph for this function:
Here is the caller graph for this function:| qint64 QFSFileEnginePrivate::sizeFdFh | ( | ) | const |
Definition at line 480 of file qfsfileengine.cpp.
References QFileSystemMetaData::clearFlags(), doStat(), metaData, QFileSystemMetaData::size(), QFileSystemMetaData::SizeAttribute, and tried_stat.
Referenced by nativeSize().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QFSFileEnginePrivate::unmap | ( | uchar * | ptr | ) |
Definition at line 630 of file qfsfileengine_unix.cpp.
References QSet< T >::find(), it, maps, QFileDevice::PermissionsError, ptr(), qt_error_string(), and QFileDevice::UnspecifiedError.
Referenced by unmapAll().
Here is the call graph for this function:
Here is the caller graph for this function:| void QFSFileEnginePrivate::unmapAll | ( | ) |
Definition at line 740 of file qfsfileengine.cpp.
References QFileSystemMetaData::clearFlags(), fh, metaData, QT_WRITE, QFileDevice::ResourceError, QFileSystemMetaData::SizeAttribute, QSystemError::stdString(), and QFileDevice::WriteError.
Referenced by nativeWrite().
Here is the call graph for this function:
Here is the caller graph for this function:| bool QFSFileEnginePrivate::closeFileHandle |
Definition at line 187 of file qfsfileengine_p.h.
Referenced by closeFdFh(), and init().
| int QFSFileEnginePrivate::fd |
Definition at line 177 of file qfsfileengine_p.h.
Referenced by doStat(), nativeHandle(), and openFd().
| FILE* QFSFileEnginePrivate::fh |
Definition at line 161 of file qfsfileengine_p.h.
Referenced by closeFdFh(), doStat(), flushFh(), init(), nativeFlush(), nativeHandle(), nativeRead(), openFd(), openFh(), posFdFh(), readFdFh(), readLineFdFh(), seekFdFh(), and writeFdFh().
| QFileSystemEntry QFSFileEnginePrivate::fileEntry |
Definition at line 124 of file qfsfileengine_p.h.
Referenced by doStat(), and isSymlink().
|
mutable |
Definition at line 192 of file qfsfileengine_p.h.
Referenced by init().
|
mutable |
Definition at line 189 of file qfsfileengine_p.h.
Referenced by init().
| bool QFSFileEnginePrivate::lastFlushFailed |
Definition at line 186 of file qfsfileengine_p.h.
Referenced by closeFdFh(), flushFh(), and init().
| LastIOCommand QFSFileEnginePrivate::lastIOCommand |
Definition at line 185 of file qfsfileengine_p.h.
Referenced by flushFh(), init(), and seekFdFh().
| QHash<uchar *, StartAndLength> QFSFileEnginePrivate::maps |
Definition at line 175 of file qfsfileengine_p.h.
Referenced by map(), unmap(), and unmapAll().
|
mutable |
Definition at line 159 of file qfsfileengine_p.h.
Referenced by doStat(), isSymlink(), map(), sizeFdFh(), and writeFdFh().
|
mutable |
Definition at line 191 of file qfsfileengine_p.h.
Referenced by init().
| QIODevice::OpenMode QFSFileEnginePrivate::openMode |
Definition at line 125 of file qfsfileengine_p.h.
Referenced by init(), map(), nativeOpen(), openFd(), and openFh().
|
mutable |
Definition at line 190 of file qfsfileengine_p.h.
Referenced by closeFdFh(), doStat(), init(), and sizeFdFh().