summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-03 20:51:31 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-04 13:26:21 (GMT)
commit0c2dc345047135cac824ffc222bfb0c26f6c23be (patch)
tree93ea6aed747d653102dbd11b666c334f786f9331 /Source/cmSystemTools.h
parentadc351db8f89c3c41190df381c65800e7514e126 (diff)
downloadCMake-0c2dc345047135cac824ffc222bfb0c26f6c23be.zip
CMake-0c2dc345047135cac824ffc222bfb0c26f6c23be.tar.gz
CMake-0c2dc345047135cac824ffc222bfb0c26f6c23be.tar.bz2
cmSystemTools: Add RenameFile signature to capture the error message
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 5bbbb0c..bb90135 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -128,10 +128,18 @@ public:
static bool SimpleGlob(const std::string& glob,
std::vector<std::string>& files, int type = 0);
+ enum class RenameResult
+ {
+ Success,
+ Failure,
+ };
+
/** Rename a file or directory within a single disk volume (atomic
if possible). */
static bool RenameFile(const std::string& oldname,
const std::string& newname);
+ static RenameResult RenameFile(std::string const& oldname,
+ std::string const& newname, std::string* err);
//! Rename a file if contents are different, delete the source otherwise
static void MoveFileIfDifferent(const std::string& source,