4#include "private/qabstractfileengine_p.h"
5#include "private/qfsfileengine_p.h"
6#ifdef QT_BUILD_CORE_LIB
7#include "private/qresource_p.h"
16#include <QtCore/private/qfilesystementry_p.h>
17#include <QtCore/private/qfilesystemmetadata_p.h>
18#include <QtCore/private/qfilesystemengine_p.h>
100 fileEngineHandlers()->prepend(
this);
171#ifndef QT_NO_FSFILEENGINE
355 std::optional<QFile::Permissions> permissions)
519 std::optional<QFile::Permissions> permissions)
const
594 while (
it.hasNext()) {
596 ret <<
it.fileName();
937void QAbstractFileEngineIterator::setPath(
const QString &
path)
980 if (!
name.isNull()) {
1107 while (readSoFar < maxlen) {
1110 if (readResult <= 0)
1111 return (readSoFar > 0) ? readSoFar : -1;
1224 return d->fileError;
1237 return d->errorString;
~QAbstractFileEngineHandlerList()
\inmodule QtCore \reentrant
virtual ~QAbstractFileEngineHandler()
Destroys the file handler.
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.
virtual QVariant entryInfo(EntryInfoType type) const
virtual ~QAbstractFileEngineIterator()
Destroys the QAbstractFileEngineIterator.
QDir::Filters filters() const
Returns the entry filters for this iterator.
virtual QString currentFileName() const =0
This pure virtual function returns the name of the current directory entry, excluding the path.
QString path() const
Returns the path for this iterator.
QStringList nameFilters() const
Returns the name filters for this iterator.
QAbstractFileEngineIterator(QDir::Filters filters, const QStringList &nameFilters)
Constructs a QAbstractFileEngineIterator, using the entry filters filters, and wildcard name filters ...
virtual QFileInfo currentFileInfo() const
The virtual function returns a QFileInfo for the current directory entry.
virtual QString currentFilePath() const
Returns the path to the current directory entry.
QAbstractFileEngine * q_ptr
\inmodule QtCore \reentrant
virtual bool remove()
Requests that the file is deleted from the file system.
virtual bool renameOverwrite(const QString &newName)
QScopedPointer< QAbstractFileEnginePrivate > d_ptr
FileOwner
\value OwnerUser The user who owns the file.
virtual bool supportsExtension(Extension extension) const
virtual ~QAbstractFileEngine()
Destroys the QAbstractFileEngine.
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()
QAbstractFileEngine()
Constructs a new QAbstractFileEngine that does not refer to any file or directory.
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.
void setError(QFile::FileError error, const QString &str)
Sets the error type to error, and the error string to errorString.
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 ...
uchar * map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags)
virtual QString fileName(FileName file=DefaultName) const
Return the file engine's current file name in the format specified by 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
static QAbstractFileEngine * create(const QString &fileName)
Creates and returns a QAbstractFileEngine suitable for processing fileName.
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 bool extension(Extension extension, const ExtensionOption *option=nullptr, ExtensionReturn *output=nullptr)
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.
QFile::FileError error() const
Returns the QFile::FileError that resulted from the last failed operation.
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.
QString errorString() const
Returns the human-readable message appropriate to the current error reported by error().
virtual bool open(QIODevice::OpenMode openMode, std::optional< QFile::Permissions > permissions=std::nullopt)
Opens the file in the specified mode.
void storeRelaxed(T newValue) noexcept
T loadRelaxed() const noexcept
\inmodule QtCore\reentrant
The QDirIterator class provides an iterator for directory entrylists.
FileError
This enum describes the errors that may be returned by the error() function.
\inmodule QtCore \reentrant
void setFile(const QString &file)
Sets the file that the QFileInfo provides information about to file.
QString filePath() const
Returns the file name, including the path (which may be absolute or relative).
static QAbstractFileEngine * resolveEntryAndCreateLegacyEngine(QFileSystemEntry &entry, QFileSystemMetaData &data)
bool isEmpty() const noexcept
bool removeOne(const AT &t)
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QString & append(QChar c)
QString & prepend(QChar c)
QSet< QString >::iterator it
Combined button and popup list for selecting options.
QAbstractFileEngine * qt_custom_file_engine_handler_create(const QString &path)
static Q_CONSTINIT QBasicAtomicInt qt_file_engine_handlers_in_use
static Q_CONSTINIT bool qt_abstractfileenginehandlerlist_shutDown
#define Q_BASIC_ATOMIC_INITIALIZER(a)
DBusConnection const char DBusError * error
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLuint GLuint64EXT address
GLsizei const GLchar *const * path
QT_BEGIN_NAMESPACE typedef uchar * output
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]