diff options
Diffstat (limited to 'backends/fs/posix/posix-fs.cpp')
| -rw-r--r-- | backends/fs/posix/posix-fs.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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) |
