ScummVM API documentation
http-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 HTTP_FILESYSTEM_H
23 #define HTTP_FILESYSTEM_H
24 
25 #include "backends/fs/abstract-fs.h"
26 #include "backends/fs/posix/posix-fs.h"
27 
34 protected:
36  Common::String _displayName;
37  Common::String _path;
38  Common::String _url;
39  AbstractFSList *_children;
40  bool _isDirectory;
41  bool _isValid;
42  int _size;
43 
47  HTTPFilesystemNode(const Common::String &path, const Common::String &displayName, const Common::String &baseUrl, bool isValid, bool isDirectory, int size);
48 
49  virtual AbstractFSNode *makeNode(const Common::String &path) const {
50  return new HTTPFilesystemNode(path);
51  }
52 
53 public:
60  ~HTTPFilesystemNode() {}
61  bool exists() const override;
62  Common::U32String getDisplayName() const override { return _displayName; }
63  Common::String getName() const override { return _displayName; }
64  Common::String getPath() const override { return _path; }
65  bool isDirectory() const override { return _isDirectory; }
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
Common::U32String getDisplayName() const override
Definition: http-fs.h:62
Definition: str.h:59
HTTPFilesystemNode(const Common::String &path, const Common::String &displayName, const Common::String &baseUrl, bool isValid, bool isDirectory, int size)
Definition: array.h:52
Common::String getName() const override
Definition: http-fs.h:63
Common::SeekableWriteStream * createWriteStream(bool atomic) override
AbstractFSNode * getChild(const Common::String &n) const override
Definition: stream.h:745
Definition: http-fs.h:33
bool isWritable() const override
Common::SeekableReadStream * createReadStream() override
bool createDirectory() override
Definition: hashmap.h:85
Definition: ustr.h:57
ListMode
Definition: fs.h:86
Common::String getPath() const override
Definition: http-fs.h:64
bool isDirectory() const override
Definition: http-fs.h:65
Definition: stream.h:351
AbstractFSNode * getParent() const override
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override
bool isReadable() const override
Definition: abstract-fs.h:41