aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2006-05-03 20:49:33 +0000
committerMax Horn2006-05-03 20:49:33 +0000
commit05f6adbbd90f58346a0bca85793069c387c54b67 (patch)
treeaeb7151779c221e1aec308d55445f4e9e234aba2
parentb67c30f6c8f5b7c31f9acd9aa7fe9ac1d295ba5f (diff)
downloadscummvm-rg350-05f6adbbd90f58346a0bca85793069c387c54b67.tar.gz
scummvm-rg350-05f6adbbd90f58346a0bca85793069c387c54b67.tar.bz2
scummvm-rg350-05f6adbbd90f58346a0bca85793069c387c54b67.zip
Removed FilesystemNode::isValid (leaving it up to the porters to decide whether to remove their isValid code or not)
svn-id: r22317
-rw-r--r--backends/fs/abstract-fs.h1
-rw-r--r--backends/fs/fs.cpp6
-rw-r--r--backends/fs/fs.h10
-rw-r--r--base/main.cpp2
-rw-r--r--common/file.cpp2
5 files changed, 2 insertions, 19 deletions
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index d6229a992c..da9cef9aab 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -85,7 +85,6 @@ public:
virtual ~AbstractFilesystemNode() {}
virtual String displayName() const = 0;
- virtual bool isValid() const = 0;
virtual bool isDirectory() const = 0;
virtual String path() const = 0;
virtual bool listDir(AbstractFSList &list, ListMode mode) const = 0;
diff --git a/backends/fs/fs.cpp b/backends/fs/fs.cpp
index 12cdc145ba..f111e78a0f 100644
--- a/backends/fs/fs.cpp
+++ b/backends/fs/fs.cpp
@@ -121,12 +121,6 @@ Common::String FilesystemNode::displayName() const {
return _realNode->displayName();
}
-bool FilesystemNode::isValid() const {
- if (_realNode == 0)
- return false;
- return _realNode->isValid();
-}
-
bool FilesystemNode::isDirectory() const {
if (_realNode == 0)
return false;
diff --git a/backends/fs/fs.h b/backends/fs/fs.h
index f2930bd375..f272cb2164 100644
--- a/backends/fs/fs.h
+++ b/backends/fs/fs.h
@@ -122,16 +122,6 @@ public:
virtual String displayName() const;
/**
- * Is this node valid? Returns true if the file/directory pointed
- * to by this node exists, false otherwise.
- *
- * @todo Maybe rename this to exists() ? Or maybe even distinguish between
- * the two? E.g. a path may be non-existant but valid, while another might
- * be completely invalid). But do we ever need to make that distinction?
- */
- virtual bool isValid() const;
-
- /**
* Is this node pointing to a directory?
* @todo Currently we assume that a valid node that is not a directory
* automatically is a file (ignoring things like symlinks). That might
diff --git a/base/main.cpp b/base/main.cpp
index e438cec0c8..a3c24ed30c 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -170,7 +170,7 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String &
if (ConfMan.hasKey("path")) {
Common::String path(ConfMan.get("path"));
FilesystemNode dir(path);
- if (!dir.isValid() || !dir.isDirectory()) {
+ if (!dir.isDirectory()) {
warning("Game directory does not exist (%s)", path.c_str());
return 0;
}
diff --git a/common/file.cpp b/common/file.cpp
index b662ab9c44..cb9836294b 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -309,7 +309,7 @@ bool File::exists(const String &filename) {
// First try to find the file it via a FilesystemNode (in case an absolute
// path was passed). But we only use this to filter out directories.
FilesystemNode file(filename);
- if (file.isValid() && file.isDirectory())
+ if (file.isDirectory())
return false;
// Next, try to locate the file by *opening* it in read mode. This has