ScummVM API documentation
wii-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 WII_FILESYSTEM_H
23 #define WII_FILESYSTEM_H
24 
25 #include "backends/fs/abstract-fs.h"
26 
32 class WiiFilesystemNode final : public AbstractFSNode {
33 protected:
34  Common::String _displayName;
35  Common::String _path;
36  bool _exists, _isDirectory, _isReadable, _isWritable;
37 
38  virtual void initRootNode();
39  virtual bool getDevopChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
40  virtual void setFlags(const struct stat *st);
41  virtual void clearFlags();
42 
43 public:
48 
55  WiiFilesystemNode(const Common::String &p, const struct stat *st);
56 
57  bool exists() const override;
58  Common::U32String getDisplayName() const override { return _displayName; }
59  Common::String getName() const override { return _displayName; }
60  Common::String getPath() const override { return _path; }
61  bool isDirectory() const override { return _isDirectory; }
62  bool isReadable() const override { return _isReadable; }
63  bool isWritable() const override { return _isWritable; }
64 
65  AbstractFSNode *getChild(const Common::String &n) const override;
66  bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override;
67  AbstractFSNode *getParent() const override;
68 
70  Common::SeekableWriteStream *createWriteStream(bool atomic) override;
71  bool createDirectory() override;
72 };
73 
74 #endif
bool isReadable() const override
Definition: wii-fs.h:62
Definition: str.h:59
Common::SeekableWriteStream * createWriteStream(bool atomic) override
Common::String getName() const override
Definition: wii-fs.h:59
Definition: array.h:52
Common::String getPath() const override
Definition: wii-fs.h:60
Common::SeekableReadStream * createReadStream() override
Definition: stream.h:745
bool isWritable() const override
Definition: wii-fs.h:63
AbstractFSNode * getParent() const override
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override
bool isDirectory() const override
Definition: wii-fs.h:61
Common::U32String getDisplayName() const override
Definition: wii-fs.h:58
bool createDirectory() override
Definition: ustr.h:57
ListMode
Definition: fs.h:86
Definition: wii-fs.h:32
AbstractFSNode * getChild(const Common::String &n) const override
Definition: stream.h:351
Definition: abstract-fs.h:41