From 747457abb647910742c5e13529894950d3c9ada4 Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Fri, 18 Jan 2002 19:21:02 -0500 Subject: [PATCH] ENH: RemoveFile returns if the file was removed or not --- Source/cmSystemTools.cxx | 4 ++-- Source/cmSystemTools.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 962cfe54c..5469622a8 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -894,9 +894,9 @@ long int cmSystemTools::ModifiedTime(const char* filename) -void cmSystemTools::RemoveFile(const char* source) +bool cmSystemTools::RemoveFile(const char* source) { - unlink(source); + return unlink(source) != 0 ? false : true; } bool cmSystemTools::IsOn(const char* val) diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 8b4dc2f78..a4311a90c 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -212,7 +212,7 @@ public: const char* destination); ///! Remove a file. - static void RemoveFile(const char* source); + static bool RemoveFile(const char* source); /** * does a string indicate a true or on value ? This is not the same