42 #ifndef QFSFILEENGINE_H 43 #define QFSFILEENGINE_H 45 #include <QtCore/qabstractfileengine.h> 50 #ifndef QT_NO_FSFILEENGINE 68 bool open(QIODevice::OpenMode openMode);
69 bool open(QIODevice::OpenMode flags, FILE *fh);
80 bool mkdir(
const QString &dirName,
bool createParentDirectories)
const;
81 bool rmdir(
const QString &dirName,
bool recurseParentDirectories)
const;
95 #ifndef QT_NO_FILESYSTEMITERATOR 108 bool open(QIODevice::OpenMode flags,
int fd);
109 bool open(QIODevice::OpenMode flags,
int fd, QFile::FileHandleFlags handleFlags);
110 bool open(QIODevice::OpenMode flags, FILE *fh, QFile::FileHandleFlags handleFlags);
112 bool open(QIODevice::OpenMode flags,
const RFile &f, QFile::FileHandleFlags handleFlags);
114 static bool setCurrentPath(
const QString &path);
129 #endif // QT_NO_FSFILEENGINE 131 #endif // QFSFILEENGINE_H
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 bool copy(const QString &newName)
Copies the contents of this file to a file with the name newName.
virtual bool open(QIODevice::OpenMode openMode)
Opens the file in the specified mode.
virtual bool setSize(qint64 size)
Requests that the file be set to size size.
#define QT_END_NAMESPACE
This macro expands to.
virtual bool flush()
Flushes the open file, returning true if successful; otherwise returns false.
virtual QString fileName(FileName file=DefaultName) const
Return the file engine's current file name in the format specified by file.
virtual bool setPermissions(uint perms)
Requests that the file's permissions be set to perms.
virtual bool isRelativePath() const
Return true if the file referred to by this file engine has a relative path; otherwise return false...
virtual bool rmdir(const QString &dirName, bool recurseParentDirectories) const
Requests that the directory dirName is deleted from the file system.
virtual QString owner(FileOwner) const
If owner is OwnerUser return the name of the user who owns 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 close()
Closes the file, returning true if successful; otherwise returns false.
FileName
These values are used to request a file name in a particular format.
The QString class provides a Unicode character string.
virtual void setFileName(const QString &file)
Sets the file engine's file name to file.
provides an extended output argument to QAbstractFileEngine's extension support.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual bool seek(qint64 pos)
Sets the file position to the given offset.
Extension
This enum describes the types of extensions that the file engine can support.
virtual bool caseSensitive() const
Should return true if the underlying file system is case-sensitive; otherwise return false...
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)
virtual bool supportsExtension(Extension extension) const
This virtual function returns true if the file engine supports extension; otherwise, false is returned.
virtual int handle() const
Returns the native file handle for this file engine.
FileTime
These are used by the fileTime() function.
virtual qint64 write(const char *data, qint64 len)
Writes len bytes from data to the file.
virtual Iterator * beginEntryList(QDir::Filters filters, const QStringList &filterNames)
Returns an instance of a QAbstractFileEngineIterator using filters for entry filtering and filterName...
static const char *const filters[3]
virtual qint64 read(char *data, qint64 maxlen)
Reads a number of characters from the file into data.
The QDateTime class provides date and time functions.
virtual Iterator * endEntryList()
virtual qint64 readLine(char *data, qint64 maxlen)
This function reads one line, terminated by a ' ' character, from the file info data.
The QAbstractFileEngineIterator class provides an iterator interface for custom file engines...
virtual bool isSequential() const
Returns true if the file is a sequential access device; returns false if the file is a direct access ...
virtual bool extension(Extension extension, const ExtensionOption *option=0, ExtensionReturn *output=0)
This virtual function can be reimplemented in a QAbstractFileEngine subclass to provide support for e...
virtual QDateTime fileTime(FileTime time) const
If time is CreationTime, return when the file was created.
#define Q_DECLARE_PRIVATE(Class)
virtual bool mkdir(const QString &dirName, bool createParentDirectories) const
Requests that the directory dirName be created.
virtual qint64 pos() const
Returns the current file position.
virtual qint64 size() const
Returns the size of the file.
virtual bool rename(const QString &newName)
Requests that the file be renamed to newName in the file system.
virtual bool link(const QString &newName)
Creates a link from the file currently specified by fileName() to newName.
The QFSFileEngine class implements Qt's default file engine.