ScummVM API documentation
n64-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 N64_FILESYSTEM_H
23 #define N64_FILESYSTEM_H
24 
25 #include "backends/fs/abstract-fs.h"
26 
32 class N64FilesystemNode final : public AbstractFSNode {
33 protected:
34  Common::String _displayName;
35  Common::String _path;
36  bool _isDirectory;
37  bool _isValid;
38 
39 public:
44 
51  N64FilesystemNode(const Common::String &p, bool verify = true);
52 
53  bool exists() const override;
54  Common::U32String getDisplayName() const override {
55  return _displayName;
56  }
57  Common::String getName() const override {
58  return _displayName;
59  }
60  Common::String getPath() const override {
61  return _path;
62  }
63  bool isDirectory() const override {
64  return _isDirectory;
65  }
66  bool isReadable() const override;
67  bool isWritable() const override;
68 
69  AbstractFSNode *getChild(const Common::String &n) const override;
70  bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override;
71  AbstractFSNode *getParent() const override;
72 
74  Common::SeekableWriteStream *createWriteStream(bool atomic) override;
75  bool createDirectory() override;
76 };
77 
78 #endif
AbstractFSNode * getParent() const override
Definition: str.h:59
Definition: n64-fs.h:32
Common::String getPath() const override
Definition: n64-fs.h:60
Definition: array.h:52
Common::U32String getDisplayName() const override
Definition: n64-fs.h:54
Definition: stream.h:745
Common::String getName() const override
Definition: n64-fs.h:57
Definition: ustr.h:57
bool isReadable() const override
ListMode
Definition: fs.h:86
bool isDirectory() const override
Definition: n64-fs.h:63
Common::SeekableWriteStream * createWriteStream(bool atomic) override
Common::SeekableReadStream * createReadStream() override
Definition: stream.h:351
AbstractFSNode * getChild(const Common::String &n) const override
bool createDirectory() override
Definition: abstract-fs.h:41
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override
bool isWritable() const override