Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

IFileSystem.h

Go to the documentation of this file.
00001 // Copyright (C) 2002-2008 Nikolaus Gebhardt
00002 // This file is part of the "Irrlicht Engine".
00003 // For conditions of distribution and use, see copyright notice in irrlicht.h
00004 
00005 #ifndef __I_FILE_SYSTEM_H_INCLUDED__
00006 #define __I_FILE_SYSTEM_H_INCLUDED__
00007 
00008 #include "IReferenceCounted.h"
00009 #include "IXMLReader.h"
00010 #include "irrString.h"
00011 
00012 namespace irr
00013 {
00014 namespace video
00015 {
00016         class IVideoDriver;
00017 } // end namespace video
00018 namespace io
00019 {
00020 
00021 class IReadFile;
00022 class IWriteFile;
00023 class IFileList;
00024 class IXMLWriter;
00025 class IAttributes;
00026 
00028 
00031 class IFileSystem : public virtual IReferenceCounted
00032 {
00033 public:
00034 
00036         virtual ~IFileSystem() {}
00037 
00039 
00043         virtual IReadFile* createAndOpenFile(const c8* filename) = 0;
00044 
00046 
00056         virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const c8* fileName, bool deleteMemoryWhenDropped=false) = 0;
00057 
00059 
00066         virtual IWriteFile* createAndWriteFile(const c8* filename, bool append=false) = 0;
00067 
00069 
00078         virtual bool addZipFileArchive(const c8* filename, bool ignoreCase = true, bool ignorePaths = true) = 0;
00079 
00081 
00088         virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase = true, bool ignorePaths = true) = 0;
00089 
00091 
00100         virtual bool addPakFileArchive(const c8* filename, bool ignoreCase = true, bool ignorePaths = true) = 0;
00101 
00103 
00104         virtual const c8* getWorkingDirectory() = 0;
00105 
00107 
00111         virtual bool changeWorkingDirectoryTo(const c8* newDirectory) = 0;
00112 
00114 
00116         virtual core::stringc getAbsolutePath(const core::stringc& filename) const = 0;
00117 
00119 
00121         virtual core::stringc getFileDir(const core::stringc& filename) const = 0;
00122 
00124 
00127         virtual IFileList* createFileList() const = 0;
00128 
00130 
00132         virtual bool existFile(const c8* filename) const = 0;
00133 
00135 
00141         virtual IXMLReader* createXMLReader(const c8* filename) = 0;
00142 
00144 
00150         virtual IXMLReader* createXMLReader(IReadFile* file) = 0;
00151 
00153 
00159         virtual IXMLReaderUTF8* createXMLReaderUTF8(const c8* filename) = 0;
00160 
00162 
00168         virtual IXMLReaderUTF8* createXMLReaderUTF8(IReadFile* file) = 0;
00169 
00171 
00175         virtual IXMLWriter* createXMLWriter(const c8* filename) = 0;
00176 
00178 
00182         virtual IXMLWriter* createXMLWriter(IWriteFile* file) = 0;
00183 
00185 
00190         virtual IAttributes* createEmptyAttributes(video::IVideoDriver* driver=0) = 0;
00191 };
00192 
00193 } // end namespace io
00194 } // end namespace irr
00195 
00196 
00197 #endif
00198 

The Irrlicht Engine
The Irrlicht Engine Documentation © 2003-2008 by Nikolaus Gebhardt. Generated on Sun Jun 1 07:59:07 2008 by Doxygen (1.4.2)