42 #ifndef QABSTRACTFILEENGINE_H
43 #define QABSTRACTFILEENGINE_H
48 #error qabstractfileengine.h must be included before any header file that defines open
58 class QFileExtensionResult;
61 class QAbstractFileEnginePrivate;
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
92 Q_DECLARE_FLAGS(FileFlags, FileFlag)
116 virtual ~QAbstractFileEngine();
118 virtual bool open(QIODevice::OpenMode openMode);
119 virtual bool close();
120 virtual bool flush();
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;
132 virtual bool caseSensitive()
const;
133 virtual bool isRelativePath()
const;
135 virtual FileFlags fileFlags(FileFlags
type=FileInfoAll)
const;
136 virtual bool setPermissions(uint perms);
137 virtual QString fileName(FileName file=DefaultName)
const;
138 virtual uint ownerId(FileOwner)
const;
139 virtual QString owner(FileOwner)
const;
140 virtual QDateTime fileTime(FileTime time)
const;
141 virtual void setFileName(
const QString &file);
142 virtual int handle()
const;
145 bool unmap(uchar *ptr);
148 virtual Iterator *beginEntryList(QDir::Filters filters,
const QStringList &filterNames);
149 virtual Iterator *endEntryList();
186 virtual bool supportsExtension(
Extension extension)
const;
189 static QAbstractFileEngine *create(
const QString &fileName);
194 QAbstractFileEngine();
195 QAbstractFileEngine(QAbstractFileEnginePrivate &);
199 Q_DECLARE_PRIVATE(QAbstractFileEngine)
200 Q_DISABLE_COPY(QAbstractFileEngine)
203 Q_DECLARE_OPERATORS_FOR_FLAGS(QAbstractFileEngine::FileFlags)
208 QAbstractFileEngineHandler();
209 virtual ~QAbstractFileEngineHandler();
210 virtual QAbstractFileEngine *create(
const QString &fileName)
const = 0;
213 class QAbstractFileEngineIteratorPrivate;
214 class Q_CORE_EXPORT QAbstractFileEngineIterator
217 QAbstractFileEngineIterator(QDir::Filters filters,
const QStringList &nameFilters);
218 virtual ~QAbstractFileEngineIterator();
221 virtual bool hasNext()
const = 0;
225 QDir::Filters filters()
const;
227 virtual QString currentFileName()
const = 0;
228 virtual QFileInfo currentFileInfo()
const;
229 QString currentFilePath()
const;
234 virtual QVariant entryInfo(EntryInfoType
type)
const;
237 Q_DISABLE_COPY(QAbstractFileEngineIterator)
239 friend class QDirIteratorPrivate;
240 void setPath(const
QString &path);
248 #endif // QABSTRACTFILEENGINE_H
GLuint GLuint GLsizei GLenum type
QFuture< void > map(Sequence &sequence, MapFunctor map)
GLXDrawable GLXDrawable read
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
QAbstractFileEngineIterator Iterator
Q_CORE_EXPORT QTextStream & flush(QTextStream &s)
QScopedPointer< QAbstractFileEnginePrivate > d_ptr
QFile::MemoryMapFlags flags