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.
This commit is contained in:
Brad King
2009-04-15 09:57:57 -04:00
parent 6218a1a786
commit d3363beb2f
3 changed files with 55 additions and 53 deletions
+4
View File
@@ -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);