Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmFileTimeComparison.h
blob72bbdfd46a5e7b298452704b4e5fc63b4de6178b
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmFileTimeComparison.h,v $
5 Language: C++
6 Date: $Date: 2008/01/03 05:01:38 $
7 Version: $Revision: 1.3 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmFileTimeComparison_h
18 #define cmFileTimeComparison_h
20 #include "cmStandardIncludes.h"
22 class cmFileTimeComparisonInternal;
24 /** \class cmFileTimeComparison
25 * \brief Helper class for performing globbing searches.
27 * Finds all files that match a given globbing expression.
29 class cmFileTimeComparison
31 public:
32 cmFileTimeComparison();
33 ~cmFileTimeComparison();
35 /**
36 * Compare file modification times.
37 * Return true for successful comparison and false for error.
38 * When true is returned, result has -1, 0, +1 for
39 * f1 older, same, or newer than f2.
41 bool FileTimeCompare(const char* f1, const char* f2, int* result);
43 /**
44 * Compare file modification times. Return true unless both files
45 * exist and have modification times less than 1 second apart.
47 bool FileTimesDiffer(const char* f1, const char* f2);
49 protected:
51 cmFileTimeComparisonInternal* Internals;
55 #endif