arsa  2.7
Public Member Functions | Public Attributes | List of all members
irr::io::IFileArchive Class Referenceabstract

The FileArchive manages archives and provides access to files inside them. More...

#include <IFileArchive.h>

Inheritance diagram for irr::io::IFileArchive:
irr::IReferenceCounted

Public Member Functions

virtual IReadFilecreateAndOpenFile (const path &filename)=0
 Opens a file based on its name. More...
 
virtual IReadFilecreateAndOpenFile (u32 index)=0
 Opens a file based on its position in the file list. More...
 
virtual const IFileListgetFileList () const =0
 Returns the complete file tree. More...
 
virtual E_FILE_ARCHIVE_TYPE getType () const
 get the archive type More...
 
virtual const io::pathgetArchiveName () const =0
 return the name (id) of the file Archive More...
 
virtual void addDirectoryToFileList (const io::path &filename)
 Add a directory in the archive and all it's files to the FileList. More...
 
- Public Member Functions inherited from irr::IReferenceCounted
 IReferenceCounted ()
 Constructor. More...
 
virtual ~IReferenceCounted ()
 Destructor. More...
 
void grab () const
 Grabs the object. Increments the reference counter by one. More...
 
bool drop () const
 Drops the object. Decrements the reference counter by one. More...
 
s32 getReferenceCount () const
 Get the reference count. More...
 
const c8getDebugName () const
 Returns the debug name of the object. More...
 

Public Attributes

core::stringc Password
 An optionally used password string. More...
 

Additional Inherited Members

- Protected Member Functions inherited from irr::IReferenceCounted
void setDebugName (const c8 *newName)
 Sets the debug name of the object. More...
 

Detailed Description

The FileArchive manages archives and provides access to files inside them.

Definition at line 56 of file IFileArchive.h.

Member Function Documentation

◆ addDirectoryToFileList()

virtual void irr::io::IFileArchive::addDirectoryToFileList ( const io::path filename)
inlinevirtual

Add a directory in the archive and all it's files to the FileList.

Only needed for file-archives which have no information about their own directory structure. In that case the user must add directories manually. Currently this is necessary for archives of type EFAT_ANDROID_ASSET. The root-path itself is already set by the engine. If directories are not added manually opening files might still work, but checks if file exists will fail.

Definition at line 92 of file IFileArchive.h.

92 {}

◆ createAndOpenFile() [1/2]

virtual IReadFile* irr::io::IFileArchive::createAndOpenFile ( const path filename)
pure virtual

Opens a file based on its name.

Creates and returns a new IReadFile for a file in the archive.

Parameters
filenameThe file to open
Returns
Returns A pointer to the created file on success, or 0 on failure.

◆ createAndOpenFile() [2/2]

virtual IReadFile* irr::io::IFileArchive::createAndOpenFile ( u32  index)
pure virtual

Opens a file based on its position in the file list.

Creates and returns

Parameters
indexThe zero based index of the file.
Returns
Returns a pointer to the created file on success, or 0 on failure.

◆ getArchiveName()

virtual const io::path& irr::io::IFileArchive::getArchiveName ( ) const
pure virtual

return the name (id) of the file Archive

◆ getFileList()

virtual const IFileList* irr::io::IFileArchive::getFileList ( ) const
pure virtual

Returns the complete file tree.

Returns
Returns the complete directory tree for the archive, including all files and folders

◆ getType()

virtual E_FILE_ARCHIVE_TYPE irr::io::IFileArchive::getType ( ) const
inlinevirtual

get the archive type

Definition at line 79 of file IFileArchive.h.

79 { return EFAT_UNKNOWN; }
The type of this archive is unknown.
Definition: IFileArchive.h:52

Member Data Documentation

◆ Password

core::stringc irr::io::IFileArchive::Password

An optionally used password string.

This variable is publicly accessible from the interface in order to avoid single access patterns to this place, and hence allow some more obscurity.

Definition at line 99 of file IFileArchive.h.


The documentation for this class was generated from the following file: