aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/psp/psp-fs.cpp
diff options
context:
space:
mode:
authorJoost Peters2008-01-17 21:35:31 +0000
committerJoost Peters2008-01-17 21:35:31 +0000
commitfa1495de7bb0280eb16b67ac3d5b6a028c5fca44 (patch)
treea70921a491c7005cb3f12b1b0fe46814addfc87f /backends/fs/psp/psp-fs.cpp
parent51ad8e29beeb8cc9ddf171e6759643ff93e2b054 (diff)
downloadscummvm-rg350-fa1495de7bb0280eb16b67ac3d5b6a028c5fca44.tar.gz
scummvm-rg350-fa1495de7bb0280eb16b67ac3d5b6a028c5fca44.tar.bz2
scummvm-rg350-fa1495de7bb0280eb16b67ac3d5b6a028c5fca44.zip
implement exists(), isReadable() and isWritable() stubs using access()
svn-id: r30537
Diffstat (limited to 'backends/fs/psp/psp-fs.cpp')
-rw-r--r--backends/fs/psp/psp-fs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 518a54d7d9..2f7ec803fe 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -58,13 +58,13 @@ public:
*/
PSPFilesystemNode(const Common::String &p, bool verify);
- virtual bool exists() const { return true; } //FIXME: this is just a stub
+ virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
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 isWritable() const { return true; } //FIXME: this is just a stub
+ 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 AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;