5#ifndef __I_FILE_SYSTEM_H_INCLUDED__
6#define __I_FILE_SYSTEM_H_INCLUDED__
67 IReadFile* alreadyOpenedFile,
long pos,
long areaSize) =0;
117 bool ignorePaths=
true,
149 bool ignorePaths=
true,
IReferenceCounted()
Constructor.
Class which is able to create an archive from a file.
Provides a generic interface for attributes and their values and the possiblity to serialize them.
The FileArchive manages archives and provides access to files inside them.
Provides a list of files and folders.
The FileSystem manages files and archives and provides access to them.
virtual bool removeFileArchive(const path &filename)=0
Removes an archive from the file system.
virtual bool existFile(const path &filename) const =0
Determines if a file exists and could be opened.
virtual IXMLReader * createXMLReader(const path &filename)=0
Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
virtual path getFileBasename(const path &filename, bool keepExtension=true) const =0
Get the base part of a filename, i.e. the name without the directory part.
virtual IWriteFile * createAndWriteFile(const path &filename, bool append=false)=0
Opens a file for write access.
virtual IWriteFile * createMemoryWriteFile(void *memory, s32 len, const path &fileName, bool deleteMemoryWhenDropped=false)=0
Creates an IWriteFile interface for accessing memory like a file.
virtual IAttributes * createEmptyAttributes(video::IVideoDriver *driver=0)=0
Creates a new empty collection of attributes, usable for serialization and more.
virtual _IRR_DEPRECATED_ bool addPakFileArchive(const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)
Adds a pak archive to the file system.
virtual IXMLReader * createXMLReader(IReadFile *file)=0
Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
virtual IReadFile * createMemoryReadFile(void *memory, s32 len, const path &fileName, bool deleteMemoryWhenDropped=false)=0
Creates an IReadFile interface for accessing memory like a file.
virtual IXMLWriter * createXMLWriter(IWriteFile *file)=0
Creates a XML Writer from a file.
virtual const path & getWorkingDirectory()=0
Get the current working directory.
virtual path & flattenFilename(path &directory, const path &root="/") const =0
flatten a path and file name for example: "/you/me/../." becomes "/you"
virtual EFileSystemType setFileListSystem(EFileSystemType listType)=0
Set the active type of file system.
virtual path getAbsolutePath(const path &filename) const =0
Converts a relative path to an absolute (unique) path, resolving symbolic links if required.
virtual _IRR_DEPRECATED_ bool addFolderFileArchive(const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)
Adds an unzipped archive (or basedirectory with subdirectories..) to the file system.
virtual u32 getFileArchiveCount() const =0
Get the number of archives currently attached to the file system.
virtual bool changeWorkingDirectoryTo(const path &newDirectory)=0
Changes the current working directory.
virtual IFileList * createFileList()=0
Creates a list of files and directories in the current working directory and returns it.
virtual IXMLWriter * createXMLWriter(const path &filename)=0
Creates a XML Writer from a file.
virtual IFileArchive * getFileArchive(u32 index)=0
Get the archive at a given index.
virtual path getRelativeFilename(const path &filename, const path &directory) const =0
Get the relative filename, relative to the given directory.
virtual IXMLReaderUTF8 * createXMLReaderUTF8(const path &filename)=0
Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).
virtual IXMLReaderUTF8 * createXMLReaderUTF8(IReadFile *file)=0
Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).
virtual IArchiveLoader * getArchiveLoader(u32 index) const =0
Retrieve the given archive loader.
virtual bool removeFileArchive(u32 index)=0
Removes an archive from the file system.
virtual IReadFile * createAndOpenFile(const path &filename)=0
Opens a file for read access.
virtual bool removeFileArchive(const IFileArchive *archive)=0
Removes an archive from the file system.
virtual bool addFileArchive(IReadFile *file, bool ignoreCase=true, bool ignorePaths=true, E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, const core::stringc &password="", IFileArchive **retArchive=0)=0
Adds an archive to the file system.
virtual void addArchiveLoader(IArchiveLoader *loader)=0
Adds an external archive loader to the engine.
virtual path getFileDir(const path &filename) const =0
Get the directory a file is located in.
virtual IFileList * createEmptyFileList(const io::path &path, bool ignoreCase, bool ignorePaths)=0
Creates an empty filelist.
virtual u32 getArchiveLoaderCount() const =0
Gets the number of archive loaders currently added.
virtual IReadFile * createLimitReadFile(const path &fileName, IReadFile *alreadyOpenedFile, long pos, long areaSize)=0
Creates an IReadFile interface for accessing files inside files.
virtual bool moveFileArchive(u32 sourceIndex, s32 relative)=0
Changes the search order of attached archives.
virtual bool addFileArchive(IFileArchive *archive)=0
Adds an archive to the file system.
virtual _IRR_DEPRECATED_ bool addZipFileArchive(const c8 *filename, bool ignoreCase=true, bool ignorePaths=true)
Adds a zip archive to the file system.
virtual bool addFileArchive(const path &filename, bool ignoreCase=true, bool ignorePaths=true, E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN, const core::stringc &password="", IFileArchive **retArchive=0)=0
Adds an archive to the file system.
Interface providing read acess to a file.
Interface providing write access to a file.
Interface providing methods for making it easier to write XML files.
Interface to driver which is able to perform 2d and 3d graphics functions.
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
string< c8 > stringc
Typedef for character strings.
This namespace provides interfaces for input/output: Reading and writing files, accessing zip archive...
EFileSystemType
FileSystemType: which Filesystem should be used for e.g. browsing.
IIrrXMLReader< c8, IReferenceCounted > IXMLReaderUTF8
An xml reader for ASCII or UTF-8 characters, derived from IReferenceCounted.
IIrrXMLReader< wchar_t, IReferenceCounted > IXMLReader
An xml reader for wide characters, derived from IReferenceCounted.
core::string< fschar_t > path
Type used for all file system related strings.
E_FILE_ARCHIVE_TYPE
Contains the different types of archives.
@ EFAT_FOLDER
A virtual directory.
@ EFAT_UNKNOWN
The type of this archive is unknown.
@ EFAT_ZIP
A PKZIP archive.
@ EFAT_PAK
An ID Software PAK archive.
The video namespace contains classes for accessing the video driver. All 2d and 3d rendering is done ...
Everything in the Irrlicht Engine can be found in this namespace.
unsigned int u32
32 bit unsigned variable.
char c8
8 bit character variable.
signed int s32
32 bit signed variable.