mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-06 10:58:01 +00:00
Removed FilesystemNode::isValid (leaving it up to the porters to decide whether to remove their isValid code or not)
svn-id: r22317
This commit is contained in:
parent
b67c30f6c8
commit
05f6adbbd9
@ -85,7 +85,6 @@ public:
|
|||||||
virtual ~AbstractFilesystemNode() {}
|
virtual ~AbstractFilesystemNode() {}
|
||||||
|
|
||||||
virtual String displayName() const = 0;
|
virtual String displayName() const = 0;
|
||||||
virtual bool isValid() const = 0;
|
|
||||||
virtual bool isDirectory() const = 0;
|
virtual bool isDirectory() const = 0;
|
||||||
virtual String path() const = 0;
|
virtual String path() const = 0;
|
||||||
virtual bool listDir(AbstractFSList &list, ListMode mode) const = 0;
|
virtual bool listDir(AbstractFSList &list, ListMode mode) const = 0;
|
||||||
|
@ -121,12 +121,6 @@ Common::String FilesystemNode::displayName() const {
|
|||||||
return _realNode->displayName();
|
return _realNode->displayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FilesystemNode::isValid() const {
|
|
||||||
if (_realNode == 0)
|
|
||||||
return false;
|
|
||||||
return _realNode->isValid();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FilesystemNode::isDirectory() const {
|
bool FilesystemNode::isDirectory() const {
|
||||||
if (_realNode == 0)
|
if (_realNode == 0)
|
||||||
return false;
|
return false;
|
||||||
|
@ -121,16 +121,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual String displayName() const;
|
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?
|
* Is this node pointing to a directory?
|
||||||
* @todo Currently we assume that a valid node that is not a directory
|
* @todo Currently we assume that a valid node that is not a directory
|
||||||
|
@ -170,7 +170,7 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String &
|
|||||||
if (ConfMan.hasKey("path")) {
|
if (ConfMan.hasKey("path")) {
|
||||||
Common::String path(ConfMan.get("path"));
|
Common::String path(ConfMan.get("path"));
|
||||||
FilesystemNode dir(path);
|
FilesystemNode dir(path);
|
||||||
if (!dir.isValid() || !dir.isDirectory()) {
|
if (!dir.isDirectory()) {
|
||||||
warning("Game directory does not exist (%s)", path.c_str());
|
warning("Game directory does not exist (%s)", path.c_str());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ bool File::exists(const String &filename) {
|
|||||||
// First try to find the file it via a FilesystemNode (in case an absolute
|
// 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.
|
// path was passed). But we only use this to filter out directories.
|
||||||
FilesystemNode file(filename);
|
FilesystemNode file(filename);
|
||||||
if (file.isValid() && file.isDirectory())
|
if (file.isDirectory())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Next, try to locate the file by *opening* it in read mode. This has
|
// Next, try to locate the file by *opening* it in read mode. This has
|
||||||
|
Loading…
x
Reference in New Issue
Block a user