summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-04-15 13:57:57 (GMT)
committerBrad King <brad.king@kitware.com>2009-04-15 13:57:57 (GMT)
commitd3363beb2f5b4bedee95aae6f6697f059ed3f48b (patch)
treef18969c5c589724ed99eab30f38607f63a9ae116 /Source/cmSystemTools.h
parent6218a1a7863ce3040ed7b7a724f10731973d6683 (diff)
downloadCMake-d3363beb2f5b4bedee95aae6f6697f059ed3f48b.zip
CMake-d3363beb2f5b4bedee95aae6f6697f059ed3f48b.tar.gz
CMake-d3363beb2f5b4bedee95aae6f6697f059ed3f48b.tar.bz2
ENH: Move RenameFile to cmSystemTools
This moves the cmGeneratedFileStream::RenameFile method implementation into cmSystemTools. It works only within a single filesystem volume, but is atomic when the operating system permits.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 8e639ac..7c6e3e9 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -166,6 +166,10 @@ public:
static bool CopyFileIfDifferent(const char* source,
const char* destination);
+ /** Rename a file or directory within a single disk volume (atomic
+ if possible). */
+ static bool RenameFile(const char* oldname, const char* newname);
+
///! Compute the md5sum of a file
static bool ComputeFileMD5(const char* source, char* md5out);