ScummVM API documentation
chroot-fs.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef BACKENDS_FS_CHROOT_CHROOT_FS_H
23#define BACKENDS_FS_CHROOT_CHROOT_FS_H
24
25#include "backends/fs/posix/posix-fs.h"
26
28 Common::String _root;
29 Common::String _drive;
30 POSIXFilesystemNode *_realNode;
31
33
34public:
35 ChRootFilesystemNode(const Common::String &root, const Common::String &path, const Common::String &drive = Common::String());
36 ~ChRootFilesystemNode() override;
37
38 bool exists() const override;
40 Common::String getName() const override;
41 Common::String getPath() const override;
42 bool isDirectory() const override;
43 bool isReadable() const override;
44 bool isWritable() const override;
45
46 AbstractFSNode *getChild(const Common::String &n) const override;
47 bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override;
48 AbstractFSNode *getParent() const override;
49
52 bool createDirectory() override;
53
54private:
55 static Common::String addPathComponent(const Common::String &path, const Common::String &component);
56};
57
58#endif /* BACKENDS_FS_CHROOT_CHROOT_FS_H */
Definition: abstract-fs.h:41
Definition: chroot-fs.h:27
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override
Common::SeekableWriteStream * createWriteStream(bool atomic) override
AbstractFSNode * getChild(const Common::String &n) const override
Common::U32String getDisplayName() const override
bool isWritable() const override
bool isDirectory() const override
Common::String getPath() const override
AbstractFSNode * getParent() const override
bool createDirectory() override
Common::SeekableReadStream * createReadStream() override
Common::String getName() const override
bool isReadable() const override
Definition: array.h:52
ListMode
Definition: fs.h:86
Definition: stream.h:745
Definition: stream.h:351
Definition: str.h:59
Definition: ustr.h:57
Definition: posix-fs.h:32