From fa1495de7bb0280eb16b67ac3d5b6a028c5fca44 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Thu, 17 Jan 2008 21:35:31 +0000 Subject: implement exists(), isReadable() and isWritable() stubs using access() svn-id: r30537 --- backends/fs/psp/psp-fs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'backends/fs') 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; -- cgit v1.2.3