From 43693c54322b836ec5b5677bd19e02688776aa58 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Wed, 15 Dec 2004 23:02:10 +0000 Subject: [PATCH] Change the signatures of the destroyFile and destroyDirectory methods to const because they affect the file system, not the Path object. llvm-svn: 18973 --- lib/System/Unix/Path.cpp | 4 ++-- lib/System/Win32/Path.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/System/Unix/Path.cpp b/lib/System/Unix/Path.cpp index 4a18c6b3f0a..a78b513c118 100644 --- a/lib/System/Unix/Path.cpp +++ b/lib/System/Unix/Path.cpp @@ -492,7 +492,7 @@ Path::createTemporaryFile(bool reuse_current) { } bool -Path::destroyDirectory(bool remove_contents) { +Path::destroyDirectory(bool remove_contents) const { // Make sure we're dealing with a directory if (!isDirectory()) return false; @@ -520,7 +520,7 @@ Path::destroyDirectory(bool remove_contents) { } bool -Path::destroyFile() { +Path::destroyFile() const { if (!isFile()) return false; if (0 != unlink(path.c_str())) ThrowErrno(path + ": Can't destroy file"); diff --git a/lib/System/Win32/Path.cpp b/lib/System/Win32/Path.cpp index d76dcd00176..3e179eaf48a 100644 --- a/lib/System/Win32/Path.cpp +++ b/lib/System/Win32/Path.cpp @@ -503,7 +503,7 @@ Path::createFile() { } bool -Path::destroyDirectory(bool remove_contents) { +Path::destroyDirectory(bool remove_contents) const { // Make sure we're dealing with a directory if (!isDirectory()) return false; @@ -532,7 +532,7 @@ Path::destroyDirectory(bool remove_contents) { } bool -Path::destroyFile() { +Path::destroyFile() const { if (!isFile()) return false; DWORD attr = GetFileAttributes(path.c_str());