summaryrefslogtreecommitdiffstats
path: root/src/jomlib/filetime.h
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@trolltech.com>2011-03-19 19:53:22 +0100
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2011-03-19 20:18:44 +0100
commit2d402eb5c1e67970f584365548a8a0238ded71f0 (patch)
treecfbcfdee99ebadf295c5896317723c8fff716cb9 /src/jomlib/filetime.h
parent9e7a8ff9e02551f53cbcc7f8d6afbf7a50fee253 (diff)
fast retrieval of file dates
Diffstat (limited to 'src/jomlib/filetime.h')
-rw-r--r--src/jomlib/filetime.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/src/jomlib/filetime.h b/src/jomlib/filetime.h
new file mode 100644
index 0000000..63f7121
--- /dev/null
+++ b/src/jomlib/filetime.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** This file is part of the jom project on Trolltech Labs.
+ **
+ ** This file may be used under the terms of the GNU General Public
+ ** License version 2.0 or 3.0 as published by the Free Software Foundation
+ ** and appearing in the file LICENSE.GPL included in the packaging of
+ ** this file. Please review the following information to ensure GNU
+ ** General Public Licensing requirements will be met:
+ ** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
+ ** http://www.gnu.org/copyleft/gpl.html.
+ **
+ ** If you are unsure which license is appropriate for your use, please
+ ** contact the sales department at qt-sales@nokia.com.
+ **
+ ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+ ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ **
+ ****************************************************************************/
+
+#include <QtGlobal>
+
+namespace NMakeFile {
+
+class FileTime
+{
+public:
+ FileTime();
+
+ typedef quint64 InternalType;
+
+ FileTime(const InternalType &ft)
+ : m_fileTime(ft)
+ { }
+
+ bool operator < (const FileTime &rhs) const;
+ bool operator <= (const FileTime &rhs) const
+ {
+ return operator < (rhs) || operator == (rhs);
+ }
+ bool operator == (const FileTime &rhs) const
+ {
+ return m_fileTime == rhs.m_fileTime;
+ }
+
+ bool isValid() const;
+ QString toString() const;
+
+ static FileTime currentTime();
+
+private:
+ friend class FastFileInfo;
+ InternalType m_fileTime;
+};
+
+} // namespace NMakeFile