summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2010-08-26 09:40:52 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2010-08-26 09:43:58 (GMT)
commit852be4c69f8dd4a890d78f9ea7210ecc9e44254a (patch)
tree7f656c816aff026159c13bca858f44cee16a2cbf
parent1218e1ecfee17aec798d73e469fea292b93f2246 (diff)
downloadQt-852be4c69f8dd4a890d78f9ea7210ecc9e44254a.zip
Qt-852be4c69f8dd4a890d78f9ea7210ecc9e44254a.tar.gz
Qt-852be4c69f8dd4a890d78f9ea7210ecc9e44254a.tar.bz2
Begin defining the interface for file engines NG
New file engine API is meant to be a thin layer of abstraction over native file system APIs. Stateless and static for the time being. Platform-specific implementations will follow. Reviewed-by: Thomas Zander Reviewed-by: Prasanth Ullattil
-rw-r--r--src/corelib/io/qfilesystemengine_p.h27
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h6
2 files changed, 33 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index 817f925..c1bb3b4 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -53,10 +53,37 @@
// We mean it.
//
+#include "qfile.h"
+#include "qfilesystementry_p.h"
+#include "qfilesystemmetadata_p.h"
+
QT_BEGIN_NAMESPACE
class QFileSystemEngine
{
+public:
+ static bool isCaseSensitive();
+
+ static QFileSystemEntry getLinkTarget(const QFileSystemEntry &link);
+ static QFileSystemEntry canonicalName(const QFileSystemEntry &entry);
+ static QFileSystemEntry absoluteName(const QFileSystemEntry &entry);
+
+ static QString bundleName(const QFileSystemEntry &entry);
+
+ static bool fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
+ QFileSystemMetaData::FileFlags what);
+
+ static bool createDirectory(const QFileSystemEntry &entry, bool createParents);
+ static bool removeDirectory(const QFileSystemEntry &entry, bool removeEmptyParents);
+
+ static bool createLink(const QFileSystemEntry &source, const QFileSystemEntry &target);
+
+ static bool copyFile(const QFileSystemEntry &source, const QFileSystemEntry &target);
+ static bool renameFile(const QFileSystemEntry &source, const QFileSystemEntry &target);
+ static bool removeFile(const QFileSystemEntry &entry);
+
+ static bool setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions,
+ QFileSystemMetaData *data = 0);
};
QT_END_NAMESPACE
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index c051bc5..9664177 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -53,10 +53,16 @@
// We mean it.
//
+#include <QtCore/qglobal.h>
+
QT_BEGIN_NAMESPACE
class QFileSystemMetaData
{
+public:
+ enum FileFlag {
+ };
+ Q_DECLARE_FLAGS(FileFlags, FileFlag);
};
QT_END_NAMESPACE