diff options
author | Brad King <brad.king@kitware.com> | 2004-10-15 13:23:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2004-10-15 13:23:14 (GMT) |
commit | b4176dcab91df1d7f28ee41e1f52eb6ae9accbf4 (patch) | |
tree | cb4c2b3b2f1905592f2c8ab16e79cd5a0a0cc16e /Source/cmSystemTools.h | |
parent | 4b20a7ad2d7ab259d75ac35309c8c27fbdc62f40 (diff) | |
download | CMake-b4176dcab91df1d7f28ee41e1f52eb6ae9accbf4.zip CMake-b4176dcab91df1d7f28ee41e1f52eb6ae9accbf4.tar.gz CMake-b4176dcab91df1d7f28ee41e1f52eb6ae9accbf4.tar.bz2 |
ENH: Added FileTimeCompare method to compare file modification times. Currently the resolution is limited to one second.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 43a5daf..a064a31 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -290,6 +290,12 @@ public: of the form var=value */ static bool PutEnv(const char* value); + /** Compare file modification times. + Returns true for successful comparison and false for error. + When true is returned, result has -1, 0, +1 for + f1 older, same, or newer than f2. */ + static bool FileTimeCompare(const char* f1, const char* f2, + int* result); private: static bool s_ForceUnixPaths; static bool s_RunCommandHideConsole; |