aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/ps2
diff options
context:
space:
mode:
authorDavid Corrales2007-10-07 00:28:38 +0000
committerDavid Corrales2007-10-07 00:28:38 +0000
commitaba30d7ea8541f7260ec7b96a8d33dd7dc06ed74 (patch)
tree86915d69c1463c4ff6fda79ab849b0f62432647b /backends/fs/ps2
parent0fab64817fd027a8321e047c1007d0e7e9e135fc (diff)
downloadscummvm-rg350-aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74.tar.gz
scummvm-rg350-aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74.tar.bz2
scummvm-rg350-aba30d7ea8541f7260ec7b96a8d33dd7dc06ed74.zip
Commit of patch #1804861. It implements a static lastPathComponent() function in each backend, used to extract the last path component of a given path, returned by getName().
svn-id: r29159
Diffstat (limited to 'backends/fs/ps2')
-rw-r--r--backends/fs/ps2/ps2-fs.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/backends/fs/ps2/ps2-fs.cpp b/backends/fs/ps2/ps2-fs.cpp
index 727e1a894f..f371af6e57 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -68,7 +68,6 @@ public:
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); }
@@ -77,6 +76,22 @@ public:
virtual AbstractFilesystemNode *getParent() const;
};
+/**
+ * Returns the last component of a given path.
+ *
+ * @param str String containing the path.
+ * @return Pointer to the first char of the last component inside str.
+ */
+const char *lastPathComponent(const Common::String &str) {
+ //FIXME: implement this method properly.
+ // This code is probably around the constructors,
+ // but I couldn't figure it out without having
+ // doubts on the correctness of my assumptions.
+ // Therefore, I leave it to the porter to correctly
+ // implement this method.
+ assert(false);
+}
+
Ps2FilesystemNode::Ps2FilesystemNode() {
_isDirectory = true;
_isRoot = true;