summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemengine_p.h
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-09-10 22:13:12 (GMT)
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2010-09-14 09:11:11 (GMT)
commit59ad6b33ac73b5981c9b3a9ba87374d33fb17228 (patch)
tree171d065290fd99df233c8a0271a724d2b532e154 /src/corelib/io/qfilesystemengine_p.h
parentc76b30f79c08499c2d9d4329c72639f80ff872b2 (diff)
downloadQt-59ad6b33ac73b5981c9b3a9ba87374d33fb17228.zip
Qt-59ad6b33ac73b5981c9b3a9ba87374d33fb17228.tar.gz
Qt-59ad6b33ac73b5981c9b3a9ba87374d33fb17228.tar.bz2
Make QFSFileEngine & QFileInfo use the new filesystemengine on Windows
QFSFileEngine now uses the QFileSystemEngine static functions to implement most of the file system related quries. All the Win32 specific code is now moved from the QFSFileEngine to QFileSystemEngine. This implements all the fillMetaData and filename query functions. These new functions behave exactly like their previous implementations in QFSFileEngine. Following optimizations are done with this. * GetFileAttributesEx() instead of GetFileAttibutes(). * GetFileInformationByHandle() instead of POSIX functions. Reviewed-by: Joao
Diffstat (limited to 'src/corelib/io/qfilesystemengine_p.h')
-rw-r--r--src/corelib/io/qfilesystemengine_p.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemengine_p.h b/src/corelib/io/qfilesystemengine_p.h
index 94a8175..1068e76 100644
--- a/src/corelib/io/qfilesystemengine_p.h
+++ b/src/corelib/io/qfilesystemengine_p.h
@@ -75,10 +75,24 @@ public:
static QString bundleName(const QFileSystemEntry &entry);
static bool fillMetaData(const QFileSystemEntry &entry, QFileSystemMetaData &data,
- QFileSystemMetaData::MetaDataFlags what);
+ QFileSystemMetaData::MetaDataFlags what);
#if defined(Q_OS_UNIX)
static bool fillMetaData(int fd, QFileSystemMetaData &data); // what = PosixStatFlags
#endif
+#if defined(Q_OS_WIN)
+
+ static bool uncListSharesOnServer(const QString &server, QStringList *list); //Used also by QFSFileEngineIterator::hasNext()
+ static bool fillMetaData(int fd, QFileSystemMetaData &data,
+ QFileSystemMetaData::MetaDataFlags what);
+ static bool fillMetaData(HANDLE fHandle, QFileSystemMetaData &data,
+ QFileSystemMetaData::MetaDataFlags what);
+ static bool fillPermissions(const QFileSystemEntry &entry, QFileSystemMetaData &data,
+ QFileSystemMetaData::MetaDataFlags what);
+ static QString homePath();
+ static QString rootPath();
+ static QString owner(const QFileSystemEntry &entry, QAbstractFileEngine::FileOwner own);
+ static QString nativeAbsoluteFilePath(const QString &path);
+#endif
static bool createDirectory(const QFileSystemEntry &entry, bool createParents);
static bool removeDirectory(const QFileSystemEntry &entry, bool removeEmptyParents);
@@ -90,12 +104,15 @@ public:
static bool removeFile(const QFileSystemEntry &entry);
static bool setPermissions(const QFileSystemEntry &entry, QFile::Permissions permissions,
- QFileSystemMetaData *data = 0);
+ QFileSystemMetaData *data = 0);
static QAbstractFileEngine *resolveEntryAndCreateLegacyEngine(QFileSystemEntry &entry,
- QFileSystemMetaData &data);
+ QFileSystemMetaData &data);
private:
static QString slowCanonicalized(const QString &path);
+#if defined(Q_OS_WIN)
+ static void clearWinStatData(QFileSystemMetaData &data);
+#endif
};
QT_END_NAMESPACE