aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDavid Corrales2007-10-31 13:59:59 +0000
committerDavid Corrales2007-10-31 13:59:59 +0000
commit2ac075e5692f45b2ca3a3ceac98e3bba290a45a0 (patch)
tree3ca6f697673445a743d02aeced70e0bb604a23fd /common
parentb4f23c84f577d844a6ee45a22483b78469e6b56c (diff)
downloadscummvm-rg350-2ac075e5692f45b2ca3a3ceac98e3bba290a45a0.tar.gz
scummvm-rg350-2ac075e5692f45b2ca3a3ceac98e3bba290a45a0.tar.bz2
scummvm-rg350-2ac075e5692f45b2ca3a3ceac98e3bba290a45a0.zip
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
Diffstat (limited to 'common')
-rw-r--r--common/file.cpp30
-rw-r--r--common/file.h3
2 files changed, 0 insertions, 33 deletions
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.
*