From 2ac075e5692f45b2ca3a3ceac98e3bba290a45a0 Mon Sep 17 00:00:00 2001 From: David Corrales Date: Wed, 31 Oct 2007 13:59:59 +0000 Subject: Removed the Common::File::removeFile() methods, and moved their implementation to the Common::DefaultSaveFileManager::removeSavefile() method, as per Marcus' appraisal and Max's approval. svn-id: r29337 --- common/file.cpp | 30 ------------------------------ common/file.h | 3 --- 2 files changed, 33 deletions(-) (limited to 'common') diff --git a/common/file.cpp b/common/file.cpp index 40f1a296f3..2c08753696 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -423,36 +423,6 @@ bool File::open(const FilesystemNode &node, AccessMode mode) { return true; } -bool File::removeFile(const String &filename){ - if (remove(filename.c_str()) != 0) { - if (errno == EACCES) { - //TODO: read-only file - } - if (errno == ENOENT) { - //TODO: non-existent file - } - - return false; - } else { - return true; - } -} - -bool File::removeFile(const FilesystemNode &node){ - if (remove(node.getPath().c_str()) != 0) { - if (errno == EACCES) { - //TODO: read-only file - } - if (errno == ENOENT) { - //TODO: non-existent file - } - - return false; - } else { - return true; - } -} - bool File::exists(const String &filename) { FilesystemNode* file; String fname = filename; diff --git a/common/file.h b/common/file.h index d966d95f2d..25c51a0afe 100644 --- a/common/file.h +++ b/common/file.h @@ -85,9 +85,6 @@ public: virtual void close(); - virtual bool removeFile(const String &filename); - virtual bool removeFile(const FilesystemNode &node); - /** * Checks if the object opened a file successfully. * -- cgit v1.2.3