Assimp v5.2.2 (January 2022)
The Asset-Importer-Lib API documentation.
Assimp::ZipArchiveIOSystem Class Reference

#include <ZipArchiveIOSystem.h>

Inherits Assimp::IOSystem.

Public Member Functions

void Close (IOStream *pFile) override
 Closes the given file and releases all resources associated with it. More...
 
bool Exists (const char *pFilename) const override
 Tests for the existence of a file at the given path. More...
 
void getFileList (std::vector< std::string > &rFileList) const
 Get the list of all files with their simplified paths Intended for use within Assimp library boundaries. More...
 
void getFileListExtension (std::vector< std::string > &rFileList, const std::string &extension) const
 Get the list of all files with extension (must be lowercase) Intended for use within Assimp library boundaries. More...
 
char getOsSeparator () const override
 Returns the system specific directory separator. More...
 
bool isOpen () const
 The file was opened and is a ZIP. More...
 
IOStreamOpen (const char *pFilename, const char *pMode="rb") override
 Open a new file with a given path. More...
 
 ZipArchiveIOSystem (IOSystem *pIOHandler, const char *pFilename, const char *pMode="r")
 Open a Zip using the proffered IOSystem. More...
 
 ZipArchiveIOSystem (IOSystem *pIOHandler, const std::string &rFilename, const char *pMode="r")
 
virtual ~ZipArchiveIOSystem ()
 
- Public Member Functions inherited from Assimp::IOSystem
virtual bool ChangeDirectory (const std::string &path)
 Will change the current directory to the given path. More...
 
virtual void Close (IOStream *pFile)=0
 Closes the given file and releases all resources associated with it. More...
 
virtual bool ComparePaths (const char *one, const char *second) const
 Compares two paths and check whether the point to identical files. More...
 
bool ComparePaths (const std::string &one, const std::string &second) const
 For backward compatibility. More...
 
virtual bool CreateDirectory (const std::string &path)
 CReates an new directory at the given path. More...
 
virtual const std::string & CurrentDirectory () const
 Returns the top directory from the stack. More...
 
virtual bool DeleteFile (const std::string &file)
 Will delete the given file. More...
 
virtual bool Exists (const char *pFile) const =0
 Tests for the existence of a file at the given path. More...
 
AI_FORCE_INLINE bool Exists (const std::string &pFile) const
 For backward compatibility. More...
 
virtual char getOsSeparator () const =0
 Returns the system specific directory separator. More...
 
 IOSystem () AI_NO_EXCEPT
 Default constructor. More...
 
virtual IOStreamOpen (const char *pFile, const char *pMode="rb")=0
 Open a new file with a given path. More...
 
IOStreamOpen (const std::string &pFile, const std::string &pMode=std::string("rb"))
 For backward compatibility. More...
 
virtual bool PopDirectory ()
 Pops the top directory from the stack. More...
 
virtual bool PushDirectory (const std::string &path)
 Pushes a new directory onto the directory stack. More...
 
virtual size_t StackSize () const
 Returns the number of directories stored on the stack. More...
 
virtual ~IOSystem ()
 Virtual destructor. More...
 

Static Public Member Functions

static bool isZipArchive (IOSystem *pIOHandler, const char *pFilename)
 
static bool isZipArchive (IOSystem *pIOHandler, const std::string &rFilename)
 

Constructor & Destructor Documentation

◆ ZipArchiveIOSystem() [1/2]

Assimp::ZipArchiveIOSystem::ZipArchiveIOSystem ( IOSystem pIOHandler,
const char *  pFilename,
const char *  pMode = "r" 
)

Open a Zip using the proffered IOSystem.

◆ ZipArchiveIOSystem() [2/2]

Assimp::ZipArchiveIOSystem::ZipArchiveIOSystem ( IOSystem pIOHandler,
const std::string &  rFilename,
const char *  pMode = "r" 
)

◆ ~ZipArchiveIOSystem()

virtual Assimp::ZipArchiveIOSystem::~ZipArchiveIOSystem ( )
virtual

Member Function Documentation

◆ Close()

void Assimp::ZipArchiveIOSystem::Close ( IOStream pFile)
overridevirtual

Closes the given file and releases all resources associated with it.

Parameters
pFileThe file instance previously created by Open().

Implements Assimp::IOSystem.

◆ Exists()

bool Assimp::ZipArchiveIOSystem::Exists ( const char *  pFile) const
overridevirtual

Tests for the existence of a file at the given path.

Parameters
pFilePath to the file
Returns
true if there is a file with this path, else false.

Implements Assimp::IOSystem.

◆ getFileList()

void Assimp::ZipArchiveIOSystem::getFileList ( std::vector< std::string > &  rFileList) const

Get the list of all files with their simplified paths Intended for use within Assimp library boundaries.

◆ getFileListExtension()

void Assimp::ZipArchiveIOSystem::getFileListExtension ( std::vector< std::string > &  rFileList,
const std::string &  extension 
) const

Get the list of all files with extension (must be lowercase) Intended for use within Assimp library boundaries.

◆ getOsSeparator()

char Assimp::ZipArchiveIOSystem::getOsSeparator ( ) const
overridevirtual

Returns the system specific directory separator.

Returns
System specific directory separator

Implements Assimp::IOSystem.

◆ isOpen()

bool Assimp::ZipArchiveIOSystem::isOpen ( ) const

The file was opened and is a ZIP.

◆ isZipArchive() [1/2]

static bool Assimp::ZipArchiveIOSystem::isZipArchive ( IOSystem pIOHandler,
const char *  pFilename 
)
static

◆ isZipArchive() [2/2]

static bool Assimp::ZipArchiveIOSystem::isZipArchive ( IOSystem pIOHandler,
const std::string &  rFilename 
)
static

◆ Open()

IOStream * Assimp::ZipArchiveIOSystem::Open ( const char *  pFile,
const char *  pMode = "rb" 
)
overridevirtual

Open a new file with a given path.

When the access to the file is finished, call Close() to release all associated resources (or the virtual dtor of the IOStream).

Parameters
pFilePath to the file
pModeDesired file I/O mode. Required are: "wb", "w", "wt", "rb", "r", "rt".
Returns
New IOStream interface allowing the lib to access the underlying file.
Note
When implementing this class to provide custom IO handling, you probably have to supply an own implementation of IOStream as well.

Implements Assimp::IOSystem.


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