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

Default implementation of IOSystem using the standard C file functions. More...

#include <DefaultIOSystem.h>

Inherits Assimp::IOSystem.

Public Member Functions

void Close (IOStream *pFile) override
 Closes the given file and releases all resources associated with it.
 
bool ComparePaths (const char *one, const char *second) const override
 Compare two paths.
 
bool Exists (const char *pFile) const override
 Tests for the existence of a file at the given path.
 
char getOsSeparator () const override
 Returns the directory separator.
 
IOStreamOpen (const char *pFile, const char *pMode="rb") override
 Open a new file with a given path.
 
- Public Member Functions inherited from Assimp::IOSystem
virtual bool ChangeDirectory (const std::string &path)
 Will change the current directory to the given path.
 
bool ComparePaths (const std::string &one, const std::string &second) const
 For backward compatibility.
 
virtual bool CreateDirectory (const std::string &path)
 CReates an new directory at the given path.
 
virtual const std::string & CurrentDirectory () const
 Returns the top directory from the stack.
 
virtual bool DeleteFile (const std::string &file)
 Will delete the given file.
 
AI_FORCE_INLINE bool Exists (const std::string &pFile) const
 For backward compatibility.
 
 IOSystem () AI_NO_EXCEPT=default
 Default constructor.
 
IOStreamOpen (const std::string &pFile, const std::string &pMode=std::string("rb"))
 For backward compatibility.
 
virtual bool PopDirectory ()
 Pops the top directory from the stack.
 
virtual bool PushDirectory (const std::string &path)
 Pushes a new directory onto the directory stack.
 
virtual size_t StackSize () const
 Returns the number of directories stored on the stack.
 
virtual ~IOSystem ()=default
 Virtual destructor.
 

Static Public Member Functions

static std::string absolutePath (const std::string &path)
 get the path of a full filepath example: /tmp/archive.tar.gz -> /tmp/
 
static std::string completeBaseName (const std::string &path)
 get the complete base name of a full filepath example: /tmp/archive.tar.gz -> archive.tar
 
static std::string fileName (const std::string &path)
 get the file name of a full filepath example: /tmp/archive.tar.gz -> archive.tar.gz
 

Detailed Description

Default implementation of IOSystem using the standard C file functions.

Member Function Documentation

◆ absolutePath()

static std::string Assimp::DefaultIOSystem::absolutePath ( const std::string &  path)
static

get the path of a full filepath example: /tmp/archive.tar.gz -> /tmp/

◆ Close()

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

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

Implements Assimp::IOSystem.

◆ ComparePaths()

bool Assimp::DefaultIOSystem::ComparePaths ( const char one,
const char second 
) const
overridevirtual

Compare two paths.

Reimplemented from Assimp::IOSystem.

◆ completeBaseName()

static std::string Assimp::DefaultIOSystem::completeBaseName ( const std::string &  path)
static

get the complete base name of a full filepath example: /tmp/archive.tar.gz -> archive.tar

◆ Exists()

bool Assimp::DefaultIOSystem::Exists ( const char pFile) const
overridevirtual

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

Implements Assimp::IOSystem.

◆ fileName()

static std::string Assimp::DefaultIOSystem::fileName ( const std::string &  path)
static

get the file name of a full filepath example: /tmp/archive.tar.gz -> archive.tar.gz

◆ getOsSeparator()

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

Returns the directory separator.

Implements Assimp::IOSystem.

◆ Open()

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

Open a new file with a given path.

Implements Assimp::IOSystem.


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