aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/ds
diff options
context:
space:
mode:
authorDavid Corrales2007-07-09 01:26:54 +0000
committerDavid Corrales2007-07-09 01:26:54 +0000
commit1a965aad9568b296545890b7bb61e0de7b052e26 (patch)
tree468cc584fb960d4417780c198172c2761ecd8006 /backends/fs/ds
parent8a36379d55afbfd5e322c1e216a11447a4de8a51 (diff)
downloadscummvm-rg350-1a965aad9568b296545890b7bb61e0de7b052e26.tar.gz
scummvm-rg350-1a965aad9568b296545890b7bb61e0de7b052e26.tar.bz2
scummvm-rg350-1a965aad9568b296545890b7bb61e0de7b052e26.zip
Update the interfaces for the getChildren method to include the hidden flag.
Also added some missing method stubs to the gamecard dc port. svn-id: r27984
Diffstat (limited to 'backends/fs/ds')
-rw-r--r--backends/fs/ds/ds-fs.cpp8
-rw-r--r--backends/fs/ds/ds-fs.h7
2 files changed, 11 insertions, 4 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index c0138459a9..11d373ea1e 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -133,10 +133,12 @@ AbstractFilesystemNode *DSFileSystemNode::getChild(const Common::String& n) cons
return NULL;
}
-bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode) const {
+bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode, bool hidden) const {
// consolePrintf("Listdir\n");
// consolePrintf("Directory\n");
+ //TODO: honor the hidden flag
+
char temp[128];
strcpy(temp, _path.c_str());
@@ -283,9 +285,11 @@ AbstractFilesystemNode *GBAMPFileSystemNode::getChild(const Common::String& n) c
return NULL;
}
-bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode) const {
+bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode, bool hidden) const {
// consolePrintf("Listdir\n");
+ //TODO: honor the hidden flag
+
enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
char temp[128], fname[128], *path, *pathTemp;
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index e3014d0d2e..ead0acc05e 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -91,7 +91,7 @@ public:
*/
virtual AbstractFilesystemNode *clone() const { return new DSFileSystemNode(this); }
virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
/**
@@ -143,18 +143,21 @@ public:
*/
GBAMPFileSystemNode(const GBAMPFileSystemNode *node);
+ virtual bool exists() const { return true; } //FIXME: this is just a stub
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
virtual String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
+ virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isValid() const { return _isValid; }
+ virtual bool isWritable() const { return true; } //FIXME: this is just a stub
/**
* Returns a copy of this node.
*/
virtual AbstractFilesystemNode *clone() const { return new GBAMPFileSystemNode(this); }
virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
};