aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorMax Horn2008-08-03 18:29:37 +0000
committerMax Horn2008-08-03 18:29:37 +0000
commit01f07b5e218cc2179343d4e6b3b905efc5fb9172 (patch)
treeffaefe921c59aa6606c6795f46789732c160b99a /backends
parentfe9323ae578eab9dd9f76457add2f63deefbf21d (diff)
downloadscummvm-rg350-01f07b5e218cc2179343d4e6b3b905efc5fb9172.tar.gz
scummvm-rg350-01f07b5e218cc2179343d4e6b3b905efc5fb9172.tar.bz2
scummvm-rg350-01f07b5e218cc2179343d4e6b3b905efc5fb9172.zip
cleanup
svn-id: r33587
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/abstract-fs.h8
-rw-r--r--backends/fs/posix/posix-fs.cpp24
2 files changed, 16 insertions, 16 deletions
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 8125ad7d95..97de40a2fc 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -64,7 +64,7 @@ protected:
*
* @param name String containing the name of the child to create a new node.
*/
- virtual AbstractFilesystemNode *getChild(const String &name) const = 0;
+ virtual AbstractFilesystemNode *getChild(const Common::String &name) const = 0;
/**
* The parent node of this directory.
@@ -100,7 +100,7 @@ public:
*
* @note By default, this method returns the value of getName().
*/
- virtual String getDisplayName() const { return getName(); }
+ virtual Common::String getDisplayName() const { return getName(); }
/**
* Returns the last component of the path pointed by this FilesystemNode.
@@ -111,12 +111,12 @@ public:
*
* @note This method is very architecture dependent, please check the concrete implementation for more information.
*/
- virtual String getName() const = 0;
+ virtual Common::String getName() const = 0;
/**
* Returns the 'path' of the current node, usable in fopen().
*/
- virtual String getPath() const = 0;
+ virtual Common::String getPath() const = 0;
/**
* Indicates whether this path refers to a directory or not.
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 5cde32c851..10782a9057 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -42,8 +42,8 @@
*/
class POSIXFilesystemNode : public AbstractFilesystemNode {
protected:
- String _displayName;
- String _path;
+ Common::String _displayName;
+ Common::String _path;
bool _isDirectory;
bool _isValid;
@@ -59,17 +59,17 @@ public:
* @param path String with the path the new node should point to.
* @param verify true if the isValid and isDirectory flags should be verified during the construction.
*/
- POSIXFilesystemNode(const String &path, bool verify);
+ POSIXFilesystemNode(const Common::String &path, bool verify);
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 Common::String getDisplayName() const { return _displayName; }
+ virtual Common::String getName() const { return _displayName; }
+ virtual Common::String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
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 AbstractFilesystemNode *getChild(const Common::String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
@@ -119,7 +119,7 @@ POSIXFilesystemNode::POSIXFilesystemNode() {
_isDirectory = true;
}
-POSIXFilesystemNode::POSIXFilesystemNode(const String &p, bool verify) {
+POSIXFilesystemNode::POSIXFilesystemNode(const Common::String &p, bool verify) {
assert(p.size() > 0);
// Expand "~/" to the value of the HOME env variable
@@ -142,12 +142,12 @@ POSIXFilesystemNode::POSIXFilesystemNode(const String &p, bool verify) {
}
}
-AbstractFilesystemNode *POSIXFilesystemNode::getChild(const String &n) const {
+AbstractFilesystemNode *POSIXFilesystemNode::getChild(const Common::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);
+ Common::String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
newPath += n;
@@ -175,7 +175,7 @@ bool POSIXFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, boo
continue;
}
- String newPath(_path);
+ Common::String newPath(_path);
if (newPath.lastChar() != '/')
newPath += '/';
newPath += dp->d_name;
@@ -236,7 +236,7 @@ AbstractFilesystemNode *POSIXFilesystemNode::getParent() const {
const char *start = _path.c_str();
const char *end = lastPathComponent(_path);
- return new POSIXFilesystemNode(String(start, end - start), true);
+ return new POSIXFilesystemNode(Common::String(start, end - start), true);
}
#endif //#if defined(UNIX)