aboutsummaryrefslogtreecommitdiff
path: root/backends/fs
diff options
context:
space:
mode:
authorDavid Corrales2007-06-04 22:02:35 +0000
committerDavid Corrales2007-06-04 22:02:35 +0000
commitfedfe66831ebed2822fe74c86ed59b6d69326f3d (patch)
treea707ffd1cf4094aef279ffa77a0f6a4f4f98d8bf /backends/fs
parent3e7c5b027e2131cde30d994ccdb27c77f0118ffe (diff)
downloadscummvm-rg350-fedfe66831ebed2822fe74c86ed59b6d69326f3d.tar.gz
scummvm-rg350-fedfe66831ebed2822fe74c86ed59b6d69326f3d.tar.bz2
scummvm-rg350-fedfe66831ebed2822fe74c86ed59b6d69326f3d.zip
Added stubs for the exists(), isReadable() and isWritable() methods for all architectures.
svn-id: r27087
Diffstat (limited to 'backends/fs')
-rw-r--r--backends/fs/abstract-fs.h8
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp5
-rw-r--r--backends/fs/dc/dc-fs.cpp3
-rw-r--r--backends/fs/ds/ds-fs.h3
-rw-r--r--backends/fs/gp32/gp32-fs.cpp2
-rw-r--r--backends/fs/morphos/abox-fs.cpp3
-rw-r--r--backends/fs/palmos/palmos-fs.cpp3
-rw-r--r--backends/fs/posix/posix-fs.cpp2
-rw-r--r--backends/fs/ps2/ps2-fs.cpp3
-rw-r--r--backends/fs/psp/psp_fs.cpp3
-rw-r--r--backends/fs/symbian/symbian-fs.cpp3
-rw-r--r--backends/fs/windows/windows-fs.cpp2
12 files changed, 33 insertions, 7 deletions
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index aaae65eed3..519337a486 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -122,14 +122,14 @@ public:
virtual bool isReadable() const = 0;
/**
- * Indicates whether this path can be written to or not.
+ * Indicates whether this path is valid or not for usage.
*/
- virtual bool isWritable() const = 0;
+ virtual bool isValid() const = 0;
/**
- * Indicates whether this path is valid or not for usage.
+ * Indicates whether this path can be written to or not.
*/
- virtual bool isValid() const = 0;
+ virtual bool isWritable() const = 0;
/* TODO:
bool isFile();
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index d28604ab18..88af467ae5 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -89,11 +89,14 @@ public:
*/
virtual ~AmigaOSFilesystemNode();
+ virtual bool exists() const { return true; } //FIXME: this is just a stub
virtual String getDisplayName() const { return _sDisplayName; };
virtual String getName() const { return _sDisplayName; };
virtual String getPath() const { return _sPath; };
- virtual bool isValid() const { return _bIsValid; };
virtual bool isDirectory() const { return _bIsDirectory; };
+ virtual bool isReadable() const { return true; } //FIXME: this is just a stub
+ virtual bool isValid() const { return _bIsValid; };
+ virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/dc/dc-fs.cpp b/backends/fs/dc/dc-fs.cpp
index 1b2d123c24..070c9b075b 100644
--- a/backends/fs/dc/dc-fs.cpp
+++ b/backends/fs/dc/dc-fs.cpp
@@ -57,11 +57,14 @@ public:
*/
RoninCDFilesystemNode(const String &path, bool verify);
+ 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
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index eeee18f322..e3014d0d2e 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -77,11 +77,14 @@ public:
*/
DSFileSystemNode(const DSFileSystemNode *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.
diff --git a/backends/fs/gp32/gp32-fs.cpp b/backends/fs/gp32/gp32-fs.cpp
index ad92365a83..92968b5976 100644
--- a/backends/fs/gp32/gp32-fs.cpp
+++ b/backends/fs/gp32/gp32-fs.cpp
@@ -59,7 +59,9 @@ public:
virtual bool isDirectory() const { return _isDirectory; }
// FIXME: isValid should return false if this Node can't be used!
// so client code can rely on the return value.
+ virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isValid() const { return true; }
+ virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/morphos/abox-fs.cpp b/backends/fs/morphos/abox-fs.cpp
index 2480354414..8f46f9a9a8 100644
--- a/backends/fs/morphos/abox-fs.cpp
+++ b/backends/fs/morphos/abox-fs.cpp
@@ -76,11 +76,14 @@ public:
*/
~ABoxFilesystemNode();
+ 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
virtual AbstractFilesystemNode *getChild(const String &name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index 7abc28bf33..eae3581196 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -56,11 +56,14 @@ public:
*/
PalmOSFilesystemNode(const String &p);
+ 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
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 712a8ce68d..2e222f34f8 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -68,8 +68,8 @@ public:
virtual String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return access(_path.c_str(), R_OK) == 0; }
- virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
virtual bool isValid() const { return _isValid; }
+ virtual bool isWritable() const { return access(_path.c_str(), W_OK) == 0; }
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 237f8a9efe..9d8e360f64 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -62,11 +62,14 @@ public:
*/
Ps2FilesystemNode(const Ps2FilesystemNode *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 !_isRoot; }
+ virtual bool isWritable() const { return true; } //FIXME: this is just a stub
virtual AbstractFilesystemNode *clone() const { return new Ps2FilesystemNode(this); }
virtual AbstractFilesystemNode *getChild(const String &n) const;
diff --git a/backends/fs/psp/psp_fs.cpp b/backends/fs/psp/psp_fs.cpp
index 079df64dcb..5b0faf3847 100644
--- a/backends/fs/psp/psp_fs.cpp
+++ b/backends/fs/psp/psp_fs.cpp
@@ -58,11 +58,14 @@ public:
*/
PSPFilesystemNode(const Common::String &p, bool verify);
+ 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
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index a235933947..5c3dd74f5c 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -59,11 +59,14 @@ public:
*/
SymbianFilesystemNode(const String &path);
+ 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
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 9cd6aa40a0..5a9e1c65b6 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -78,8 +78,8 @@ public:
virtual String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return _access(_path.c_str(), R_OK) == 0; }
- virtual bool isWritable() const { return _access(_path.c_str(), W_OK) == 0; }
virtual bool isValid() const { return _isValid; }
+ virtual bool isWritable() const { return _access(_path.c_str(), W_OK) == 0; }
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode) const;