Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members | Tutorials |
#include <IFileSystem.h>
Public Member Functions | |
virtual void | addArchiveLoader (IArchiveLoader *loader)=0 |
Adds an external archive loader to the engine. | |
virtual bool | addFileArchive (const path &filename, bool ignoreCase=true, bool ignorePaths=true, E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN)=0 |
Adds an archive to the file system. | |
virtual bool | addFolderFileArchive (const c8 *filename, bool ignoreCase=true, bool ignorePaths=true) |
Adds an unzipped archive (or basedirectory with subdirectories..) to the file system. | |
virtual bool | addPakFileArchive (const c8 *filename, bool ignoreCase=true, bool ignorePaths=true) |
Adds a pak archive to the file system. | |
virtual bool | addZipFileArchive (const c8 *filename, bool ignoreCase=true, bool ignorePaths=true) |
Adds a zip archive to the file system. Deprecated! This function is provided for compatibility. | |
virtual bool | changeWorkingDirectoryTo (const path &newDirectory)=0 |
Changes the current working directory. | |
virtual IReadFile * | createAndOpenFile (const path &filename)=0 |
Opens a file for read access. | |
virtual IWriteFile * | createAndWriteFile (const path &filename, bool append=false)=0 |
Opens a file for write access. | |
virtual IAttributes * | createEmptyAttributes (video::IVideoDriver *driver=0)=0 |
Creates a new empty collection of attributes, usable for serialization and more. | |
virtual IFileList * | createEmptyFileList (const io::path &path, bool ignoreCase, bool ignorePaths)=0 |
Creates an empty filelist. | |
virtual IFileList * | createFileList ()=0 |
Creates a list of files and directories in the current working directory and returns it. | |
virtual IReadFile * | createLimitReadFile (const path &fileName, IReadFile *alreadyOpenedFile, long pos, long areaSize)=0 |
Creates an IReadFile interface for accessing files inside files. | |
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 IWriteFile * | createMemoryWriteFile (void *memory, s32 len, const path &fileName, bool deleteMemoryWhenDropped=false)=0 |
Creates an IWriteFile interface for accessing memory like a file. | |
virtual IXMLReader * | createXMLReader (IReadFile *file)=0 |
Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*). | |
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 IXMLReaderUTF8 * | createXMLReaderUTF8 (IReadFile *file)=0 |
Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*). | |
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 IXMLWriter * | createXMLWriter (IWriteFile *file)=0 |
Creates a XML Writer from a file. | |
virtual IXMLWriter * | createXMLWriter (const path &filename)=0 |
Creates a XML Writer from a file. | |
virtual bool | existFile (const path &filename) const =0 |
Determines if a file exists and could be opened. | |
virtual path & | flattenFilename (path &directory, const path &root="/") const =0 |
flatten a path and file name for example: "/you/me/../." becomes "/you" | |
virtual path | getAbsolutePath (const path &filename) const =0 |
Converts a relative path to an absolute (unique) path, resolving symbolic links if required. | |
virtual IFileArchive * | getFileArchive (u32 index)=0 |
Returns the archive at a given index. | |
virtual u32 | getFileArchiveCount () const =0 |
Returns the number of archives currently attached to the file system. | |
virtual path | getFileBasename (const path &filename, bool keepExtension=true) const =0 |
Returns the base part of a filename, i.e. the name without the directory part. | |
virtual path | getFileDir (const path &filename) const =0 |
Returns the directory a file is located in. | |
virtual const path & | getWorkingDirectory ()=0 |
Get the current working directory. | |
virtual bool | moveFileArchive (u32 sourceIndex, s32 relative)=0 |
Changes the search order of attached archives. | |
virtual bool | removeFileArchive (const path &filename)=0 |
Removes an archive from the file system. | |
virtual bool | removeFileArchive (u32 index)=0 |
Removes an archive from the file system. | |
virtual EFileSystemType | setFileListSystem (EFileSystemType listType)=0 |
Set the active type of file system. |
It manages where files are, so that modules which use the the IO do not need to know where every file is located. A file could be in a .zip-Archive or as file on disk, using the IFileSystem makes no difference to this.
Definition at line 32 of file IFileSystem.h.
virtual void irr::io::IFileSystem::addArchiveLoader | ( | IArchiveLoader * | loader | ) | [pure virtual] |
Adds an external archive loader to the engine.
Use this function to add support for new archive types to the engine, for example propiatrary or encyrpted file storage.
virtual bool irr::io::IFileSystem::addFileArchive | ( | const path & | filename, | |
bool | ignoreCase = true , |
|||
bool | ignorePaths = true , |
|||
E_FILE_ARCHIVE_TYPE | archiveType = EFAT_UNKNOWN | |||
) | [pure virtual] |
Adds an archive to the file system.
After calling this, the Irrlicht Engine will also search and open files directly from this archive. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are no different than .zip files. By default Irrlicht supports ZIP, PAK, TAR and directories as archives. You can provide your own archive types by implementing IArchiveLoader and passing an instance to addArchiveLoader.
filename,: | Filename of the archive to add to the file system. | |
ignoreCase,: | If set to true, files in the archive can be accessed without writing all letters in the right case. | |
ignorePaths,: | If set to true, files in the added archive can be accessed without its complete path. | |
archiveType,: | If no specific E_FILE_ARCHIVE_TYPE is selected then the type of archive will depend on the extension of the file name. If you use a different extension then you can use this parameter to force a specific type of archive. |
Referenced by addFolderFileArchive(), addPakFileArchive(), and addZipFileArchive().
virtual bool irr::io::IFileSystem::addFolderFileArchive | ( | const c8 * | filename, | |
bool | ignoreCase = true , |
|||
bool | ignorePaths = true | |||
) | [inline, virtual] |
Adds an unzipped archive (or basedirectory with subdirectories..) to the file system.
Deprecated! This function is provided for compatibility with older versions of Irrlicht and may be removed in future versions, you should use addFileArchive instead. Useful for handling data which will be in a zip file
filename,: | Filename of the unzipped zip archive base directory to add to the file system. | |
ignoreCase,: | If set to true, files in the archive can be accessed without writing all letters in the right case. | |
ignorePaths,: | If set to true, files in the added archive can be accessed without its complete path. |
Definition at line 171 of file IFileSystem.h.
References addFileArchive(), and irr::io::EFAT_FOLDER.
virtual bool irr::io::IFileSystem::addPakFileArchive | ( | const c8 * | filename, | |
bool | ignoreCase = true , |
|||
bool | ignorePaths = true | |||
) | [inline, virtual] |
Adds a pak archive to the file system.
Deprecated! This function is provided for compatibility with older versions of Irrlicht and may be removed in future versions, you should use addFileArchive instead. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake2/KingPin/Hexen2 .pak files
filename,: | Filename of the pak archive to add to the file system. | |
ignoreCase,: | If set to true, files in the archive can be accessed without writing all letters in the right case. | |
ignorePaths,: | If set to true, files in the added archive can be accessed without its complete path.(should not use with Quake2 paks |
Definition at line 188 of file IFileSystem.h.
References addFileArchive(), and irr::io::EFAT_PAK.
virtual bool irr::io::IFileSystem::addZipFileArchive | ( | const c8 * | filename, | |
bool | ignoreCase = true , |
|||
bool | ignorePaths = true | |||
) | [inline, virtual] |
Adds a zip archive to the file system. Deprecated! This function is provided for compatibility.
with older versions of Irrlicht and may be removed in future versions, you should use addFileArchive instead. After calling this, the Irrlicht Engine will search and open files directly from this archive too. This is useful for hiding data from the end user, speeding up file access and making it possible to access for example Quake3 .pk3 files, which are no different than .zip files.
filename,: | Filename of the zip archive to add to the file system. | |
ignoreCase,: | If set to true, files in the archive can be accessed without writing all letters in the right case. | |
ignorePaths,: | If set to true, files in the added archive can be accessed without its complete path. |
Definition at line 156 of file IFileSystem.h.
References addFileArchive(), and irr::io::EFAT_ZIP.
virtual bool irr::io::IFileSystem::changeWorkingDirectoryTo | ( | const path & | newDirectory | ) | [pure virtual] |
Changes the current working directory.
newDirectory,: | A string specifying the new working directory. The string is operating system dependent. Under Windows it has the form "<drive>:\<directory>\<sudirectory>\<..>". An example would be: "C:\Windows\" |
Opens a file for read access.
filename,: | Name of file to open. |
virtual IWriteFile* irr::io::IFileSystem::createAndWriteFile | ( | const path & | filename, | |
bool | append = false | |||
) | [pure virtual] |
Opens a file for write access.
filename,: | Name of file to open. | |
append,: | If the file already exist, all write operations are appended to the file. |
virtual IAttributes* irr::io::IFileSystem::createEmptyAttributes | ( | video::IVideoDriver * | driver = 0 |
) | [pure virtual] |
Creates a new empty collection of attributes, usable for serialization and more.
driver,: | Video driver to be used to load textures when specified as attribute values. Can be null to prevent automatic texture loading by attributes. |
virtual IFileList* irr::io::IFileSystem::createEmptyFileList | ( | const io::path & | path, | |
bool | ignoreCase, | |||
bool | ignorePaths | |||
) | [pure virtual] |
Creates an empty filelist.
virtual IFileList* irr::io::IFileSystem::createFileList | ( | ) | [pure virtual] |
Creates a list of files and directories in the current working directory and returns it.
virtual IReadFile* irr::io::IFileSystem::createLimitReadFile | ( | const path & | fileName, | |
IReadFile * | alreadyOpenedFile, | |||
long | pos, | |||
long | areaSize | |||
) | [pure virtual] |
Creates an IReadFile interface for accessing files inside files.
This is useful e.g. for archives.
fileName,: | The name given to this file | |
alreadyOpenedFile,: | Pointer to the enclosing file | |
pos,: | Start of the file inside alreadyOpenedFile | |
areaSize,: | The length of the file |
virtual IReadFile* irr::io::IFileSystem::createMemoryReadFile | ( | void * | memory, | |
s32 | len, | |||
const path & | fileName, | |||
bool | deleteMemoryWhenDropped = false | |||
) | [pure virtual] |
Creates an IReadFile interface for accessing memory like a file.
This allows you to use a pointer to memory where an IReadFile is requested.
memory,: | A pointer to the start of the file in memory | |
len,: | The length of the memory in bytes | |
fileName,: | The name given to this file | |
deleteMemoryWhenDropped,: | True if the memory should be deleted along with the IReadFile when it is dropped. |
virtual IWriteFile* irr::io::IFileSystem::createMemoryWriteFile | ( | void * | memory, | |
s32 | len, | |||
const path & | fileName, | |||
bool | deleteMemoryWhenDropped = false | |||
) | [pure virtual] |
Creates an IWriteFile interface for accessing memory like a file.
This allows you to use a pointer to memory where an IWriteFile is requested. You are responsible for allocating enough memory.
memory,: | A pointer to the start of the file in memory (allocated by you) | |
len,: | The length of the memory in bytes | |
fileName,: | The name given to this file | |
deleteMemoryWhenDropped,: | True if the memory should be deleted along with the IWriteFile when it is dropped. |
virtual IXMLReader* irr::io::IFileSystem::createXMLReader | ( | IReadFile * | file | ) | [pure virtual] |
Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for more information on how to use the parser.
virtual IXMLReader* irr::io::IFileSystem::createXMLReader | ( | const path & | filename | ) | [pure virtual] |
Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for more information on how to use the parser.
virtual IXMLReaderUTF8* irr::io::IFileSystem::createXMLReaderUTF8 | ( | IReadFile * | file | ) | [pure virtual] |
Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).
Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for more information on how to use the parser.
virtual IXMLReaderUTF8* irr::io::IFileSystem::createXMLReaderUTF8 | ( | const path & | filename | ) | [pure virtual] |
Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).
Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for more information on how to use the parser.
virtual IXMLWriter* irr::io::IFileSystem::createXMLWriter | ( | IWriteFile * | file | ) | [pure virtual] |
Creates a XML Writer from a file.
virtual IXMLWriter* irr::io::IFileSystem::createXMLWriter | ( | const path & | filename | ) | [pure virtual] |
Creates a XML Writer from a file.
virtual bool irr::io::IFileSystem::existFile | ( | const path & | filename | ) | const [pure virtual] |
Determines if a file exists and could be opened.
filename | is the string identifying the file which should be tested for existence. |
Referenced by irr::scene::quake3::getTextures().
virtual path& irr::io::IFileSystem::flattenFilename | ( | path & | directory, | |
const path & | root = "/" | |||
) | const [pure virtual] |
flatten a path and file name for example: "/you/me/../." becomes "/you"
Converts a relative path to an absolute (unique) path, resolving symbolic links if required.
filename | Possibly relative file or directory name to query. |
virtual IFileArchive* irr::io::IFileSystem::getFileArchive | ( | u32 | index | ) | [pure virtual] |
Returns the archive at a given index.
virtual u32 irr::io::IFileSystem::getFileArchiveCount | ( | ) | const [pure virtual] |
Returns the number of archives currently attached to the file system.
virtual path irr::io::IFileSystem::getFileBasename | ( | const path & | filename, | |
bool | keepExtension = true | |||
) | const [pure virtual] |
Returns the base part of a filename, i.e. the name without the directory part.
If no directory is prefixed, the full name is returned.
filename,: | The file to get the basename from | |
keepExtension | True if filename with extension is returned otherwise everything after the final '.' is removed as well. |
Returns the directory a file is located in.
filename,: | The file to get the directory from. |
virtual const path& irr::io::IFileSystem::getWorkingDirectory | ( | ) | [pure virtual] |
Get the current working directory.
Changes the search order of attached archives.
sourceIndex,: | The index of the archive to change | |
relative,: | The relative change in position, archives with a lower index are searched first |
virtual bool irr::io::IFileSystem::removeFileArchive | ( | const path & | filename | ) | [pure virtual] |
Removes an archive from the file system.
This will close the archive and free any file handles, but will not close resources which have already been loaded and are now cached, for example textures and meshes.
filename | The archive of the given name will be removed |
virtual bool irr::io::IFileSystem::removeFileArchive | ( | u32 | index | ) | [pure virtual] |
Removes an archive from the file system.
This will close the archive and free any file handles, but will not close resources which have already been loaded and are now cached, for example textures and meshes.
index,: | The index of the archive to remove |
virtual EFileSystemType irr::io::IFileSystem::setFileListSystem | ( | EFileSystemType | listType | ) | [pure virtual] |
Set the active type of file system.
The Irrlicht
Engine Documentation © 2003-2009 by Nikolaus Gebhardt. Generated
on Sun Jan 10 09:24:12 2010 by Doxygen
(1.5.6) |