mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Change the signatures of the destroyFile and destroyDirectory methods to
const because they affect the file system, not the Path object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -492,7 +492,7 @@ Path::createTemporaryFile(bool reuse_current) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyDirectory(bool remove_contents) {
|
Path::destroyDirectory(bool remove_contents) const {
|
||||||
// Make sure we're dealing with a directory
|
// Make sure we're dealing with a directory
|
||||||
if (!isDirectory()) return false;
|
if (!isDirectory()) return false;
|
||||||
|
|
||||||
@@ -520,7 +520,7 @@ Path::destroyDirectory(bool remove_contents) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyFile() {
|
Path::destroyFile() const {
|
||||||
if (!isFile()) return false;
|
if (!isFile()) return false;
|
||||||
if (0 != unlink(path.c_str()))
|
if (0 != unlink(path.c_str()))
|
||||||
ThrowErrno(path + ": Can't destroy file");
|
ThrowErrno(path + ": Can't destroy file");
|
||||||
|
@@ -492,7 +492,7 @@ Path::createTemporaryFile(bool reuse_current) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyDirectory(bool remove_contents) {
|
Path::destroyDirectory(bool remove_contents) const {
|
||||||
// Make sure we're dealing with a directory
|
// Make sure we're dealing with a directory
|
||||||
if (!isDirectory()) return false;
|
if (!isDirectory()) return false;
|
||||||
|
|
||||||
@@ -520,7 +520,7 @@ Path::destroyDirectory(bool remove_contents) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyFile() {
|
Path::destroyFile() const {
|
||||||
if (!isFile()) return false;
|
if (!isFile()) return false;
|
||||||
if (0 != unlink(path.c_str()))
|
if (0 != unlink(path.c_str()))
|
||||||
ThrowErrno(path + ": Can't destroy file");
|
ThrowErrno(path + ": Can't destroy file");
|
||||||
|
@@ -503,7 +503,7 @@ Path::createFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyDirectory(bool remove_contents) {
|
Path::destroyDirectory(bool remove_contents) const {
|
||||||
// Make sure we're dealing with a directory
|
// Make sure we're dealing with a directory
|
||||||
if (!isDirectory()) return false;
|
if (!isDirectory()) return false;
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ Path::destroyDirectory(bool remove_contents) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyFile() {
|
Path::destroyFile() const {
|
||||||
if (!isFile()) return false;
|
if (!isFile()) return false;
|
||||||
|
|
||||||
DWORD attr = GetFileAttributes(path.c_str());
|
DWORD attr = GetFileAttributes(path.c_str());
|
||||||
|
@@ -503,7 +503,7 @@ Path::createFile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyDirectory(bool remove_contents) {
|
Path::destroyDirectory(bool remove_contents) const {
|
||||||
// Make sure we're dealing with a directory
|
// Make sure we're dealing with a directory
|
||||||
if (!isDirectory()) return false;
|
if (!isDirectory()) return false;
|
||||||
|
|
||||||
@@ -532,7 +532,7 @@ Path::destroyDirectory(bool remove_contents) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Path::destroyFile() {
|
Path::destroyFile() const {
|
||||||
if (!isFile()) return false;
|
if (!isFile()) return false;
|
||||||
|
|
||||||
DWORD attr = GetFileAttributes(path.c_str());
|
DWORD attr = GetFileAttributes(path.c_str());
|
||||||
|
Reference in New Issue
Block a user