aboutsummaryrefslogtreecommitdiff
path: root/backends/fs/chroot
diff options
context:
space:
mode:
authorVincent Bénony2015-12-03 07:13:15 +0100
committerVincent Bénony2016-01-06 16:17:31 +0100
commitc1e664b6d681e4f59de361457e7487c138aaf31f (patch)
tree3c63b447c304bdf428652cc362793c895d386977 /backends/fs/chroot
parent106e3a87bdeb4485e232bec57ff516bb634700b6 (diff)
downloadscummvm-rg350-c1e664b6d681e4f59de361457e7487c138aaf31f.tar.gz
scummvm-rg350-c1e664b6d681e4f59de361457e7487c138aaf31f.tar.bz2
scummvm-rg350-c1e664b6d681e4f59de361457e7487c138aaf31f.zip
IOS: Replaces spaces with tabs
Diffstat (limited to 'backends/fs/chroot')
-rw-r--r--backends/fs/chroot/chroot-fs-factory.cpp24
-rw-r--r--backends/fs/chroot/chroot-fs-factory.h10
-rw-r--r--backends/fs/chroot/chroot-fs.cpp58
-rw-r--r--backends/fs/chroot/chroot-fs.h40
4 files changed, 66 insertions, 66 deletions
diff --git a/backends/fs/chroot/chroot-fs-factory.cpp b/backends/fs/chroot/chroot-fs-factory.cpp
index 4030f4f502..fa98ab75d3 100644
--- a/backends/fs/chroot/chroot-fs-factory.cpp
+++ b/backends/fs/chroot/chroot-fs-factory.cpp
@@ -32,29 +32,29 @@
#include "backends/fs/posix/posix-fs-factory.h"
ChRootFilesystemFactory::ChRootFilesystemFactory(Common::String root) {
- _root = root;
+ _root = root;
}
AbstractFSNode *ChRootFilesystemFactory::makeRootFileNode() const {
- return new ChRootFilesystemNode(_root, "/");
+ return new ChRootFilesystemNode(_root, "/");
}
AbstractFSNode *ChRootFilesystemFactory::makeCurrentDirectoryFileNode() const {
- char buf[MAXPATHLEN];
- if (getcwd(buf, MAXPATHLEN) == NULL) {
- return NULL;
- }
+ char buf[MAXPATHLEN];
+ if (getcwd(buf, MAXPATHLEN) == NULL) {
+ return NULL;
+ }
- if (Common::String(buf).hasPrefix(_root + Common::String("/"))) {
- return new ChRootFilesystemNode(_root, buf + _root.size());
- }
+ if (Common::String(buf).hasPrefix(_root + Common::String("/"))) {
+ return new ChRootFilesystemNode(_root, buf + _root.size());
+ }
- return new ChRootFilesystemNode(_root, "/");
+ return new ChRootFilesystemNode(_root, "/");
}
AbstractFSNode *ChRootFilesystemFactory::makeFileNodePath(const Common::String &path) const {
- assert(!path.empty());
- return new ChRootFilesystemNode(_root, path);
+ assert(!path.empty());
+ return new ChRootFilesystemNode(_root, path);
}
#endif
diff --git a/backends/fs/chroot/chroot-fs-factory.h b/backends/fs/chroot/chroot-fs-factory.h
index 2c05107b0f..c7bd9a74a7 100644
--- a/backends/fs/chroot/chroot-fs-factory.h
+++ b/backends/fs/chroot/chroot-fs-factory.h
@@ -27,15 +27,15 @@
class ChRootFilesystemFactory : public FilesystemFactory {
private:
- Common::String _root;
+ Common::String _root;
protected:
- virtual AbstractFSNode *makeRootFileNode() const;
- virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
- virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
+ virtual AbstractFSNode *makeRootFileNode() const;
+ virtual AbstractFSNode *makeCurrentDirectoryFileNode() const;
+ virtual AbstractFSNode *makeFileNodePath(const Common::String &path) const;
public:
- ChRootFilesystemFactory(Common::String root);
+ ChRootFilesystemFactory(Common::String root);
};
#endif /* CHROOT_FS_FACTORY_H */
diff --git a/backends/fs/chroot/chroot-fs.cpp b/backends/fs/chroot/chroot-fs.cpp
index 1a2bc4c087..7cdd800dac 100644
--- a/backends/fs/chroot/chroot-fs.cpp
+++ b/backends/fs/chroot/chroot-fs.cpp
@@ -33,79 +33,79 @@
#include "backends/fs/chroot/chroot-fs.h"
ChRootFilesystemNode::ChRootFilesystemNode(const Common::String &root, POSIXFilesystemNode *node) {
- _root = Common::normalizePath(root, '/');
- _realNode = node;
+ _root = Common::normalizePath(root, '/');
+ _realNode = node;
}
ChRootFilesystemNode::ChRootFilesystemNode(const Common::String &root, const Common::String &path) {
- _root = Common::normalizePath(root, '/');
- _realNode = new POSIXFilesystemNode(root.stringByAppendingPathComponent(path));
+ _root = Common::normalizePath(root, '/');
+ _realNode = new POSIXFilesystemNode(root.stringByAppendingPathComponent(path));
}
ChRootFilesystemNode::~ChRootFilesystemNode() {
- delete _realNode;
+ delete _realNode;
}
bool ChRootFilesystemNode::exists() const {
- return _realNode->exists();
+ return _realNode->exists();
}
Common::String ChRootFilesystemNode::getDisplayName() const {
- return getName();
+ return getName();
}
Common::String ChRootFilesystemNode::getName() const {
- return _realNode->AbstractFSNode::getDisplayName();
+ return _realNode->AbstractFSNode::getDisplayName();
}
Common::String ChRootFilesystemNode::getPath() const {
- Common::String path = _realNode->getPath();
- if (path.size() > _root.size()) {
- return Common::String(path.c_str() + _root.size());
- }
- return Common::String("/");
+ Common::String path = _realNode->getPath();
+ if (path.size() > _root.size()) {
+ return Common::String(path.c_str() + _root.size());
+ }
+ return Common::String("/");
}
bool ChRootFilesystemNode::isDirectory() const {
- return _realNode->isDirectory();
+ return _realNode->isDirectory();
}
bool ChRootFilesystemNode::isReadable() const {
- return _realNode->isReadable();
+ return _realNode->isReadable();
}
bool ChRootFilesystemNode::isWritable() const {
- return _realNode->isWritable();
+ return _realNode->isWritable();
}
AbstractFSNode *ChRootFilesystemNode::getChild(const Common::String &n) const {
- return new ChRootFilesystemNode(_root, (POSIXFilesystemNode *) _realNode->getChild(n));
+ return new ChRootFilesystemNode(_root, (POSIXFilesystemNode *) _realNode->getChild(n));
}
bool ChRootFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const {
- AbstractFSList tmp;
- if (!_realNode->getChildren(tmp, mode, hidden)) {
- return false;
- }
+ AbstractFSList tmp;
+ if (!_realNode->getChildren(tmp, mode, hidden)) {
+ return false;
+ }
- for (AbstractFSList::iterator i=tmp.begin(); i!=tmp.end(); ++i) {
- list.push_back(new ChRootFilesystemNode(_root, (POSIXFilesystemNode *) *i));
- }
+ for (AbstractFSList::iterator i=tmp.begin(); i!=tmp.end(); ++i) {
+ list.push_back(new ChRootFilesystemNode(_root, (POSIXFilesystemNode *) *i));
+ }
- return true;
+ return true;
}
AbstractFSNode *ChRootFilesystemNode::getParent() const {
- if (getPath() == "/") return 0;
- return new ChRootFilesystemNode(_root, (POSIXFilesystemNode *) _realNode->getParent());
+ if (getPath() == "/") return 0;
+ return new ChRootFilesystemNode(_root, (POSIXFilesystemNode *) _realNode->getParent());
}
Common::SeekableReadStream *ChRootFilesystemNode::createReadStream() {
- return _realNode->createReadStream();
+ return _realNode->createReadStream();
}
Common::WriteStream *ChRootFilesystemNode::createWriteStream() {
- return _realNode->createWriteStream();
+ return _realNode->createWriteStream();
}
#endif
diff --git a/backends/fs/chroot/chroot-fs.h b/backends/fs/chroot/chroot-fs.h
index 7dd62cb9a8..2d4c3eb9dd 100644
--- a/backends/fs/chroot/chroot-fs.h
+++ b/backends/fs/chroot/chroot-fs.h
@@ -26,29 +26,29 @@
#include "backends/fs/posix/posix-fs.h"
class ChRootFilesystemNode : public AbstractFSNode {
- Common::String _root;
- POSIXFilesystemNode *_realNode;
+ Common::String _root;
+ POSIXFilesystemNode *_realNode;
- ChRootFilesystemNode(const Common::String &root, POSIXFilesystemNode *);
+ ChRootFilesystemNode(const Common::String &root, POSIXFilesystemNode *);
public:
- ChRootFilesystemNode(const Common::String &root, const Common::String &path);
- virtual ~ChRootFilesystemNode();
-
- virtual bool exists() const;
- virtual Common::String getDisplayName() const;
- virtual Common::String getName() const;
- virtual Common::String getPath() const;
- virtual bool isDirectory() const;
- virtual bool isReadable() const;
- virtual bool isWritable() const;
-
- virtual AbstractFSNode *getChild(const Common::String &n) const;
- virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
- virtual AbstractFSNode *getParent() const;
-
- virtual Common::SeekableReadStream *createReadStream();
- virtual Common::WriteStream *createWriteStream();
+ ChRootFilesystemNode(const Common::String &root, const Common::String &path);
+ virtual ~ChRootFilesystemNode();
+
+ virtual bool exists() const;
+ virtual Common::String getDisplayName() const;
+ virtual Common::String getName() const;
+ virtual Common::String getPath() const;
+ virtual bool isDirectory() const;
+ virtual bool isReadable() const;
+ virtual bool isWritable() const;
+
+ virtual AbstractFSNode *getChild(const Common::String &n) const;
+ virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
+ virtual AbstractFSNode *getParent() const;
+
+ virtual Common::SeekableReadStream *createReadStream();
+ virtual Common::WriteStream *createWriteStream();
};
#endif /* CHROOT_FS_H */