diff options
author | Max Horn | 2006-07-22 14:14:16 +0000 |
---|---|---|
committer | Max Horn | 2006-07-22 14:14:16 +0000 |
commit | 6ed00cd055abcc98b8ad5d4e2ac6396852ec9c95 (patch) | |
tree | a3f1c83c0bc528f22576bd3f523af49f2a805460 /backends/fs/ds | |
parent | 42cebc00dcb5c274c96f69bb2658906d1ce269ec (diff) | |
download | scummvm-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/ds')
-rw-r--r-- | backends/fs/ds/ds-fs.cpp | 20 | ||||
-rw-r--r-- | backends/fs/ds/ds-fs.h | 1 |
2 files changed, 11 insertions, 10 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp index e2f0065e1d..e0e7be3fea 100644 --- a/backends/fs/ds/ds-fs.cpp +++ b/backends/fs/ds/ds-fs.cpp @@ -151,11 +151,11 @@ AbstractFilesystemNode* DSFileSystemNode::parent() const { } -AbstractFilesystemNode *DSFileSystemNode::child(const Common::String& name) const { +AbstractFilesystemNode *DSFileSystemNode::child(const Common::String& n) const { if (_path.lastChar() == '\\') { - return new DSFileSystemNode(_path + name); + return new DSFileSystemNode(_path + n); } else { - return new DSFileSystemNode(_path + "\\" + name); + return new DSFileSystemNode(_path + "\\" + n); } return NULL; @@ -193,14 +193,14 @@ bool DSFileSystemNode::listDir(AbstractFSList &dirList, ListMode mode) const { if (_zipFile->restartFile()) { do { - char name[128]; - _zipFile->getFileName(name); + char n[128]; + _zipFile->getFileName(n); -// consolePrintf("file: %s\n", name); +// consolePrintf("file: %s\n", n); if ( (_zipFile->isDirectory() && ((mode == FilesystemNode::kListDirectoriesOnly) || (mode == FilesystemNode::kListAll)) ) || (!_zipFile->isDirectory() && ((mode == FilesystemNode::kListFilesOnly) || (mode == FilesystemNode::kListAll)) ) ) { - DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + String(name), _zipFile->isDirectory()); + DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + String(n), _zipFile->isDirectory()); dsfsn->_isDirectory = _zipFile->isDirectory(); dirList.push_back((dsfsn)); } @@ -311,11 +311,11 @@ AbstractFilesystemNode* GBAMPFileSystemNode::parent() const { } -AbstractFilesystemNode *GBAMPFileSystemNode::child(const Common::String& name) const { +AbstractFilesystemNode *GBAMPFileSystemNode::child(const Common::String& n) const { if (_path.lastChar() == '\\') { - return new DSFileSystemNode(_path + name); + return new DSFileSystemNode(_path + n); } else { - return new DSFileSystemNode(_path + "\\" + name); + return new DSFileSystemNode(_path + "\\" + n); } return NULL; diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h index b9957a5c69..2d16217f06 100644 --- a/backends/fs/ds/ds-fs.h +++ b/backends/fs/ds/ds-fs.h @@ -59,6 +59,7 @@ public: DSFileSystemNode(const String& path, bool isDir); 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; } |