4#ifndef QFSFILEENGINE_P_H
5#define QFSFILEENGINE_P_H
18#include "qplatformdefs.h"
19#include "QtCore/private/qabstractfileengine_p.h"
20#include <QtCore/private/qfilesystementry_p.h>
21#include <QtCore/private/qfilesystemmetadata_p.h>
30#ifndef QT_NO_FSFILEENGINE
52 bool open(QIODevice::OpenMode openMode, std::optional<QFile::Permissions> permissions)
override;
53 bool open(QIODevice::OpenMode
flags, FILE *fh);
54 bool close()
override;
55 bool flush()
override;
66 bool mkdir(
const QString &dirName,
bool createParentDirectories,
67 std::optional<QFile::Permissions> permissions)
const override;
68 bool rmdir(
const QString &dirName,
bool recurseParentDirectories)
const override;
82 int handle()
const override;
84#ifndef QT_NO_FILESYSTEMITERATOR
102 bool open(QIODevice::OpenMode
flags,
int fd, QFile::FileHandleFlags handleFlags);
103 bool open(QIODevice::OpenMode
flags, FILE *fh, QFile::FileHandleFlags handleFlags);
127 bool nativeOpen(QIODevice::OpenMode openMode, std::optional<QFile::Permissions> permissions);
128 bool openFh(QIODevice::OpenMode
flags, FILE *fh);
129 bool openFd(QIODevice::OpenMode
flags,
int fd);
133 bool nativeSyncToDisk();
135 qint64 nativeSize()
const;
149 int nativeHandle()
const;
150 bool nativeIsSequential()
const;
168 mutable int cachedFd;
169 mutable DWORD fileAttrib;
195 bool doStat(QFileSystemMetaData::MetaDataFlags
flags)
const;
199 bool isSymlink()
const;
201#if defined(Q_OS_WIN32)
219 bool nativeOpenImpl(QIODevice::OpenMode openMode, mode_t
mode);
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.
\inmodule QtCore \reentrant
virtual bool remove()
Requests that the file is deleted from the file system.
virtual bool renameOverwrite(const QString &newName)
FileOwner
\value OwnerUser The user who owns the file.
virtual bool supportsExtension(Extension extension) const
virtual bool copy(const QString &newName)
Copies the contents of this file to a file with the name newName.
virtual bool setPermissions(uint perms)
Requests that the file's permissions be set to perms.
virtual bool setFileTime(const QDateTime &newDate, FileTime time)
virtual bool isRelativePath() const
Return true if the file referred to by this file engine has a relative path; otherwise return false.
virtual void setFileName(const QString &file)
Sets the file engine's file name to file.
virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const
Requests that the directory dirName is deleted from the file system.
virtual bool close()
Closes the file, returning true if successful; otherwise returns false.
virtual qint64 write(const char *data, qint64 len)
Writes len bytes from data to the file.
virtual int handle() const
Returns the native file handle for this file engine.
virtual bool flush()
Flushes the open file, returning true if successful; otherwise returns false.
virtual Iterator * endEntryList()
virtual bool seek(qint64 pos)
Sets the file position to the given offset.
virtual bool mkdir(const QString &dirName, bool createParentDirectories, std::optional< QFile::Permissions > permissions=std::nullopt) const
Requests that the directory dirName be created with the specified permissions.
virtual qint64 readLine(char *data, qint64 maxlen)
This function reads one line, terminated by a '\n' character, from the file info data.
virtual qint64 read(char *data, qint64 maxlen)
Reads a number of characters from the file into data.
virtual bool rename(const QString &newName)
Requests that the file be renamed to newName in the file system.
virtual QDateTime fileTime(FileTime time) const
If time is BirthTime, return when the file was born (created).
virtual bool link(const QString &newName)
Creates a link from the file currently specified by fileName() to newName.
virtual bool cloneTo(QAbstractFileEngine *target)
FileTime
These are used by the fileTime() function.
virtual qint64 size() const
Returns the size of the file.
virtual uint ownerId(FileOwner) const
If owner is OwnerUser return the ID of the user who owns the file.
virtual QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const
Requests that a list of all the files matching the filters list based on the filterNames in the file ...
virtual bool isSequential() const
Returns true if the file is a sequential access device; returns false if the file is a direct access ...
virtual QByteArray id() const
virtual FileFlags fileFlags(FileFlags type=FileInfoAll) const
This function should return the set of OR'd flags that are true for the file engine's file,...
virtual Iterator * beginEntryList(QDir::Filters filters, const QStringList &filterNames)
Returns an instance of a QAbstractFileEngineIterator using filters for entry filtering and filterName...
FileName
These values are used to request a file name in a particular format.
virtual qint64 pos() const
Returns the current file position.
virtual bool syncToDisk()
virtual QString owner(FileOwner) const
If owner is OwnerUser return the name of the user who owns the file.
virtual bool caseSensitive() const
Should return true if the underlying file system is case-sensitive; otherwise return false.
virtual bool setSize(qint64 size)
Requests that the file be set to size size.
virtual bool open(QIODevice::OpenMode openMode, std::optional< QFile::Permissions > permissions=std::nullopt)
Opens the file in the specified mode.
\inmodule QtCore\reentrant
QHash< uchar *, StartAndLength > maps
QIODevice::OpenMode openMode
QFileSystemEntry fileEntry
QFileSystemMetaData metaData
static bool openModeCanCreate(QIODevice::OpenMode openMode)
bool isSequentialFdFh() const
QAbstractFileEngine::FileFlags getPermissions(QAbstractFileEngine::FileFlags type) const
LastIOCommand lastIOCommand
virtual bool isUnnamedFile() const
\macro QT_RESTRICTED_CAST_FROM_ASCII
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
Q_CORE_EXPORT ProcessOpenModeResult processOpenModeFlags(QIODevice::OpenMode mode)
static ControlElement< T > * ptr(QWidget *widget)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLsizei const GLchar *const * path
#define Q_AUTOTEST_EXPORT
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
QT_BEGIN_NAMESPACE typedef uchar * output
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
QIODevice::OpenMode openMode