ScummVM API documentation
file.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 ULTIMA_SHARED_CORE_FILE_H
23 #define ULTIMA_SHARED_CORE_FILE_H
24 
25 #include "common/file.h"
26 #include "common/str.h"
27 
28 namespace Ultima {
29 namespace Shared {
30 
34 class File : public Common::File {
35 private:
36  int32 _filesize;
37 public:
38  File() : Common::File(), _filesize(-1) {}
39  File(const Common::Path &name);
40 
45  bool open(const Common::Path &name) override;
46 
52  bool open(const Common::Path &name, Common::Archive &archive) override;
53 
58  bool open(const Common::FSNode &node) override;
59 
65  bool open(SeekableReadStream *stream, const Common::String &name) override;
66 
70  void close() override;
71 
75  bool eof();
76 };
77 
78 } // End of namespace Shared
79 } // End of namespace Ultima
80 
81 #endif
Definition: str.h:59
Definition: path.h:52
Definition: archive.h:141
Definition: detection.h:27
Definition: file.h:47
Definition: fs.h:69
Definition: file.h:34
void close() override
bool open(const Common::Path &name) override