QtCore/qfile.h Source File
Go to the documentation of this file.
53 #error qfile.h must be included before any header file that defines open
70 Q_DECLARE_PRIVATE(
QFile)
88 PermissionsError = 13,
96 ReadOwner = 0x4000, WriteOwner = 0x2000, ExeOwner = 0x1000,
97 ReadUser = 0x0400, WriteUser = 0x0200, ExeUser = 0x0100,
98 ReadGroup = 0x0040, WriteGroup = 0x0020, ExeGroup = 0x0010,
99 ReadOther = 0x0004, WriteOther = 0x0002, ExeOther = 0x0001
101 Q_DECLARE_FLAGS(Permissions, Permission)
104 AutoCloseHandle = 0x0001,
107 Q_DECLARE_FLAGS(FileHandleFlags, FileHandleFlag)
111 #ifndef QT_NO_QOBJECT
112 explicit QFile(
QObject *parent);
117 FileError error()
const;
121 void setFileName(
const QString &name);
128 {
return decodeName(
QByteArray(localFileName)); }
129 static void setEncodingFunction(EncoderFn);
130 static void setDecodingFunction(DecoderFn);
133 static bool exists(
const QString &fileName);
141 static bool remove(
const QString &fileName);
143 bool rename(
const QString &newName);
144 static bool rename(
const QString &oldName,
const QString &newName);
146 bool link(
const QString &newName);
149 bool copy(
const QString &newName);
150 static bool copy(
const QString &fileName,
const QString &newName);
152 bool isSequential()
const;
154 bool open(OpenMode flags);
155 bool open(FILE *
f, OpenMode flags);
156 bool open(
int fd, OpenMode flags);
158 bool open(
const RFile &
f, OpenMode flags, FileHandleFlags handleFlags = DontCloseHandle);
160 bool open(FILE *
f, OpenMode ioFlags, FileHandleFlags handleFlags);
161 bool open(
int fd, OpenMode ioFlags, FileHandleFlags handleFlags);
162 virtual void close();
173 Permissions permissions()
const;
174 static Permissions permissions(
const QString &filename);
175 bool setPermissions(Permissions permissionSpec);
176 static bool setPermissions(
const QString &filename, Permissions permissionSpec);
187 virtual QAbstractFileEngine *fileEngine()
const;
190 typedef Permission PermissionSpec;
191 inline QT3_SUPPORT
QString name()
const {
return fileName(); }
192 inline QT3_SUPPORT
void setName(
const QString &aName) { setFileName(aName); }
193 inline QT3_SUPPORT
bool open(OpenMode aFlags, FILE *
f) {
return open(f, aFlags); }
194 inline QT3_SUPPORT
bool open(OpenMode aFlags,
int fd) {
return open(fd, aFlags); }
199 QFile(QFilePrivate &dd);
201 QFile(QFilePrivate &dd,
QObject *parent = 0);
209 Q_DISABLE_COPY(QFile)
212 Q_DECLARE_OPERATORS_FOR_FLAGS(QFile::Permissions)
static QString symLinkTarget(const QString &fileName)
QFuture< void > map(Sequence &sequence, MapFunctor map)
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
QString symLinkTarget() const
static QString decodeName(const char *localFileName)
GLuint const GLchar * name
Q_CORE_EXPORT QTextStream & flush(QTextStream &s)
Something important does not work.