ScummVM API documentation
amigaos-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 AMIGAOS_FILESYSTEM_H
23#define AMIGAOS_FILESYSTEM_H
24
25#ifdef __USE_INLINE__
26#undef __USE_INLINE__
27#endif
28
29#include <proto/exec.h>
30#include <proto/dos.h>
31#include <stdio.h>
32
33#ifndef USE_NEWLIB
34#include <strings.h>
35#endif
36
37#include "backends/fs/abstract-fs.h"
38
45protected:
52
53 Common::String _sDisplayName;
54 Common::String _sPath;
55 bool _bIsDirectory;
56 bool _bIsValid;
57 uint32 _nProt;
58
62 virtual AbstractFSList listVolumes() const;
63
67 bool isRootNode() const { return _bIsValid && _bIsDirectory && _pFileLock == 0; }
68
69public:
74
81
90 AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
91
98
103
104 bool exists() const override;
105 Common::U32String getDisplayName() const override { return _sDisplayName; }
106 Common::String getName() const override { return _sDisplayName; }
107 Common::String getPath() const override { return _sPath; }
108 bool isDirectory() const override { return _bIsDirectory; }
109 bool isReadable() const override;
110 bool isWritable() const override;
111
112 AbstractFSNode *getChild(const Common::String &n) const override;
113 bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override;
114 AbstractFSNode *getParent() const override;
115
118 bool createDirectory() override;
119};
120
121
122#endif
Definition: abstract-fs.h:41
Definition: amigaos-fs.h:44
AbstractFSNode * getParent() const override
Common::SeekableReadStream * createReadStream() override
virtual AbstractFSList listVolumes() const
Common::String getName() const override
Definition: amigaos-fs.h:106
AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName=0)
bool isWritable() const override
Common::SeekableWriteStream * createWriteStream(bool atomic) override
AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node)
bool isDirectory() const override
Definition: amigaos-fs.h:108
Common::U32String getDisplayName() const override
Definition: amigaos-fs.h:105
Common::String getPath() const override
Definition: amigaos-fs.h:107
~AmigaOSFilesystemNode() override
BPTR _pFileLock
Definition: amigaos-fs.h:51
bool isRootNode() const
Definition: amigaos-fs.h:67
bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const override
AbstractFSNode * getChild(const Common::String &n) const override
AmigaOSFilesystemNode(const Common::String &p)
bool isReadable() const override
bool createDirectory() 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