QtCore/qfsfileengine.h Source File

qfsfileengine.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QFSFILEENGINE_H
43 #define QFSFILEENGINE_H
44 
46 #ifdef Q_OS_SYMBIAN
47 #include <f32file.h>
48 #endif
49 
50 #ifndef QT_NO_FSFILEENGINE
51 
53 
55 
56 QT_MODULE(Core)
57 
58 class QFSFileEnginePrivate;
59 
60 class Q_CORE_EXPORT QFSFileEngine : public QAbstractFileEngine
61 {
62  Q_DECLARE_PRIVATE(QFSFileEngine)
63 public:
64  QFSFileEngine();
65  explicit QFSFileEngine(const QString &file);
66  ~QFSFileEngine();
67 
68  bool open(QIODevice::OpenMode openMode);
69  bool open(QIODevice::OpenMode flags, FILE *fh);
70  bool close();
71  bool flush();
72  qint64 size() const;
73  qint64 pos() const;
74  bool seek(qint64);
75  bool isSequential() const;
76  bool remove();
77  bool copy(const QString &newName);
78  bool rename(const QString &newName);
79  bool link(const QString &newName);
80  bool mkdir(const QString &dirName, bool createParentDirectories) const;
81  bool rmdir(const QString &dirName, bool recurseParentDirectories) const;
82  bool setSize(qint64 size);
83  bool caseSensitive() const;
84  bool isRelativePath() const;
85  QStringList entryList(QDir::Filters filters, const QStringList &filterNames) const;
86  FileFlags fileFlags(FileFlags type) const;
87  bool setPermissions(uint perms);
88  QString fileName(FileName file) const;
89  uint ownerId(FileOwner) const;
90  QString owner(FileOwner) const;
91  QDateTime fileTime(FileTime time) const;
92  void setFileName(const QString &file);
93  int handle() const;
94 
95 #ifndef QT_NO_FILESYSTEMITERATOR
96  Iterator *beginEntryList(QDir::Filters filters, const QStringList &filterNames);
97  Iterator *endEntryList();
98 #endif
99 
100  qint64 read(char *data, qint64 maxlen);
101  qint64 readLine(char *data, qint64 maxlen);
102  qint64 write(const char *data, qint64 len);
103 
104  bool extension(Extension extension, const ExtensionOption *option = 0, ExtensionReturn *output = 0);
105  bool supportsExtension(Extension extension) const;
106 
107  //FS only!!
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);
111 #ifdef Q_OS_SYMBIAN
112  bool open(QIODevice::OpenMode flags, const RFile &f, QFile::FileHandleFlags handleFlags);
113 #endif
114  static bool setCurrentPath(const QString &path);
115  static QString currentPath(const QString &path = QString());
116  static QString homePath();
117  static QString rootPath();
118  static QString tempPath();
119  static QFileInfoList drives();
120 
121 protected:
122  QFSFileEngine(QFSFileEnginePrivate &dd);
123 };
124 
126 
128 
129 #endif // QT_NO_FSFILEENGINE
130 
131 #endif // QFSFILEENGINE_H
GLuint GLuint GLsizei GLenum type
Definition: GLee.h:872
#define QT_END_NAMESPACE
Definition: qglobal.h:128
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
long long qint64
Definition: qglobal.h:947
GLXDrawable GLXDrawable read
Definition: GLee.h:10243
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: GLee.h:880
Q_CORE_EXPORT QTextStream & flush(QTextStream &s)
GLenum GLsizei len
Definition: GLee.h:2695
#define QT_END_HEADER
Definition: qglobal.h:142
GLclampf f
Definition: GLee.h:9303
GLsizeiptr size
Definition: GLee.h:1561