42 #ifndef QABSTRACTFILEENGINE_H 43 #define QABSTRACTFILEENGINE_H 45 #include <QtCore/qdir.h> 48 #error qabstractfileengine.h must be included before any header file that defines open 58 class QFileExtensionResult;
68 ReadOwnerPerm = 0x4000, WriteOwnerPerm = 0x2000, ExeOwnerPerm = 0x1000,
69 ReadUserPerm = 0x0400, WriteUserPerm = 0x0200, ExeUserPerm = 0x0100,
70 ReadGroupPerm = 0x0040, WriteGroupPerm = 0x0020, ExeGroupPerm = 0x0010,
71 ReadOtherPerm = 0x0004, WriteOtherPerm = 0x0002, ExeOtherPerm = 0x0001,
76 DirectoryType = 0x40000,
80 HiddenFlag = 0x0100000,
81 LocalDiskFlag = 0x0200000,
82 ExistsFlag = 0x0400000,
87 PermsMask = 0x0000FFFF,
88 TypesMask = 0x000F0000,
89 FlagsMask = 0x0FF00000,
90 FileInfoAll = FlagsMask | PermsMask | TypesMask
118 virtual bool open(QIODevice::OpenMode openMode);
119 virtual bool close();
120 virtual bool flush();
121 virtual qint64 size()
const;
122 virtual qint64 pos()
const;
123 virtual bool seek(
qint64 pos);
124 virtual bool isSequential()
const;
125 virtual bool remove();
126 virtual bool copy(
const QString &newName);
127 virtual bool rename(
const QString &newName);
128 virtual bool link(
const QString &newName);
129 virtual bool mkdir(
const QString &dirName,
bool createParentDirectories)
const;
130 virtual bool rmdir(
const QString &dirName,
bool recurseParentDirectories)
const;
131 virtual bool setSize(
qint64 size);
132 virtual bool caseSensitive()
const;
133 virtual bool isRelativePath()
const;
135 virtual FileFlags fileFlags(FileFlags
type=FileInfoAll)
const;
136 virtual bool setPermissions(
uint perms);
141 virtual void setFileName(
const QString &file);
142 virtual int handle()
const;
148 virtual Iterator *beginEntryList(QDir::Filters
filters,
const QStringList &filterNames);
149 virtual Iterator *endEntryList();
186 virtual bool supportsExtension(
Extension extension)
const;
208 QAbstractFileEngineHandler();
209 virtual ~QAbstractFileEngineHandler();
221 virtual bool hasNext()
const = 0;
227 virtual QString currentFileName()
const = 0;
228 virtual QFileInfo currentFileInfo()
const;
229 QString currentFilePath()
const;
240 void setPath(const
QString &path);
248 #endif // QABSTRACTFILEENGINE_H The QVariant class acts like a union for the most common Qt data types.
#define QT_END_NAMESPACE
This macro expands to.
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
static Expression::Ptr create(Expression *const expr, const YYLTYPE &sourceLocator, const ParserContext *const parseInfo)
FileName
These values are used to request a file name in a particular format.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
FileFlag
The permissions and types of a file, suitable for OR'ing together.
The QDirIterator class provides an iterator for directory entrylists.
The QString class provides a Unicode character string.
QFile::MemoryMapFlags flags
provides an extended output argument to QAbstractFileEngine's extension support.
Q_GUI_EXPORT QString errorString(EGLint code=eglGetError())
QFuture< void > map(Sequence &sequence, MapFunction function)
#define QT_BEGIN_NAMESPACE
This macro expands to.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
Extension
This enum describes the types of extensions that the file engine can support.
The QStringList class provides a list of strings.
provides an extended input argument to QAbstractFileEngine's extension support.
The QAbstractFileEngine class provides an abstraction for accessing the filesystem.
static const char * data(const QByteArray &arr)
const T * ptr(const T &t)
FileTime
These are used by the fileTime() function.
static const char *const filters[3]
The QDateTime class provides date and time functions.
QScopedPointer< QAbstractFileEnginePrivate > d_ptr
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines...
Q_CORE_EXPORT QTextStream & flush(QTextStream &s)
QAbstractFileEngineIterator Iterator
#define Q_DECLARE_PRIVATE(Class)
MemoryMapFlags
This enum describes special options that may be used by the map() function.
FileError
This enum describes the errors that may be returned by the error() function.
The QFileInfo class provides system-independent file information.
EntryInfoType
This enum describes the different types of information that can be requested through the QAbstractFil...
static QString fileName(const QString &fileUrl)
int open(const char *, int,...)
The QAbstractFileEngineHandler class provides a way to register custom file engines with your applica...