aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/posix
diff options
context:
space:
mode:
authorMax Horn2006-07-22 14:14:16 +0000
committerMax Horn2006-07-22 14:14:16 +0000
commit6ed00cd055abcc98b8ad5d4e2ac6396852ec9c95 (patch)
treea3f1c83c0bc528f22576bd3f523af49f2a805460 /backends/fs/posix
parent42cebc00dcb5c274c96f69bb2658906d1ce269ec (diff)
downloadscummvm-rg350-6ed00cd055abcc98b8ad5d4e2ac6396852ec9c95.tar.gz
scummvm-rg350-6ed00cd055abcc98b8ad5d4e2ac6396852ec9c95.tar.bz2
scummvm-rg350-6ed00cd055abcc98b8ad5d4e2ac6396852ec9c95.zip
Added FilesystemNode::name method
svn-id: r23553
Diffstat (limited to 'backends/fs/posix')
-rw-r--r--backends/fs/posix/posix-fs.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index cd5d0209b8..6edcb8a84d 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -50,13 +50,14 @@ public:
POSIXFilesystemNode(const String &path, bool verify);
virtual String displayName() const { return _displayName; }
+ virtual String name() const { return _displayName; }
virtual bool isValid() const { return _isValid; }
virtual bool isDirectory() const { return _isDirectory; }
virtual String path() const { return _path; }
virtual bool listDir(AbstractFSList &list, ListMode mode) const;
virtual AbstractFilesystemNode *parent() const;
- virtual AbstractFilesystemNode *child(const String &name) const;
+ virtual AbstractFilesystemNode *child(const String &n) const;
};
@@ -208,14 +209,14 @@ AbstractFilesystemNode *POSIXFilesystemNode::parent() const {
return p;
}
-AbstractFilesystemNode *POSIXFilesystemNode::child(const String &name) const {
+AbstractFilesystemNode *POSIXFilesystemNode::child(const String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
- newPath += name;
+ newPath += n;
POSIXFilesystemNode *p = new POSIXFilesystemNode(newPath, true);
return p;