ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

amigaos4-fs.h

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #ifndef AMIGAOS_FILESYSTEM_H
00024 #define AMIGAOS_FILESYSTEM_H
00025 
00026 #ifdef __USE_INLINE__
00027 #undef __USE_INLINE__
00028 #endif
00029 
00030 #include <proto/exec.h>
00031 #include <proto/dos.h>
00032 #include <stdio.h>
00033 
00034 #ifndef USE_NEWLIB
00035 #include <strings.h>
00036 #endif
00037 
00038 #include "backends/fs/abstract-fs.h"
00039 
00045 class AmigaOSFilesystemNode : public AbstractFSNode {
00046 protected:
00052     BPTR _pFileLock;
00053 
00054     Common::String _sDisplayName;
00055     Common::String _sPath;
00056     bool _bIsDirectory;
00057     bool _bIsValid;
00058     uint32 _nProt;
00059 
00063     virtual AbstractFSList listVolumes() const;
00064 
00068     bool isRootNode() const { return _bIsValid && _bIsDirectory && _pFileLock == 0; }
00069 
00070 public:
00074     AmigaOSFilesystemNode();
00075 
00081     AmigaOSFilesystemNode(const Common::String &p);
00082 
00091     AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayName = 0);
00092 
00098     AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node);
00099 
00103     virtual ~AmigaOSFilesystemNode();
00104 
00105     virtual bool exists() const;
00106     virtual Common::String getDisplayName() const { return _sDisplayName; }
00107     virtual Common::String getName() const { return _sDisplayName; }
00108     virtual Common::String getPath() const { return _sPath; }
00109     virtual bool isDirectory() const { return _bIsDirectory; }
00110     virtual bool isReadable() const;
00111     virtual bool isWritable() const;
00112 
00113     virtual AbstractFSNode *getChild(const Common::String &n) const;
00114     virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
00115     virtual AbstractFSNode *getParent() const;
00116 
00117     virtual Common::SeekableReadStream *createReadStream();
00118     virtual Common::WriteStream *createWriteStream();
00119     virtual bool create(bool isDirectoryFlag);
00120 };
00121 
00122 
00123 #endif


Generated on Sat Dec 7 2019 05:00:25 for ResidualVM by doxygen 1.7.1
curved edge   curved edge