CPP-API: Interface to the file system.
More...
Inherits AllocateFromAssimpHeap.
Inherited by Assimp::BlobIOSystem, Assimp::CIOSystemWrapper, Assimp::DefaultIOSystem, Assimp::FileSystemFilter, Assimp::MemoryIOSystem, Assimp::TestIOSystem, Assimp::ZipArchiveIOSystem, and JavaIOSystem.
CPP-API: Interface to the file system.
Derive an own implementation from this interface to supply custom file handling to the importer library. If you implement this interface, you also want to supply a custom implementation for IOStream.
- See also
- Importer::SetIOHandler()
◆ IOSystem()
◆ ~IOSystem()
Virtual destructor.
It is safe to be called from within DLL Assimp, we're constructed on Assimp's heap.
◆ ChangeDirectory()
AI_FORCE_INLINE bool Assimp::IOSystem::ChangeDirectory |
( |
const std::string & |
path | ) |
|
|
virtual |
◆ Close()
virtual void Assimp::IOSystem::Close |
( |
IOStream * |
pFile | ) |
|
|
pure virtual |
◆ ComparePaths() [1/2]
bool IOSystem::ComparePaths |
( |
const char * |
one, |
|
|
const char * |
second |
|
) |
| const |
|
virtual |
Compares two paths and check whether the point to identical files.
The dummy implementation of this virtual member performs a case-insensitive comparison of the given strings. The default IO system implementation uses OS mechanisms to convert relative into absolute paths, so the result can be trusted.
- Parameters
-
one | First file |
second | Second file |
- Returns
- true if the paths point to the same file. The file needn't be existing, however.
Reimplemented in Assimp::MemoryIOSystem, Assimp::FileSystemFilter, and Assimp::DefaultIOSystem.
◆ ComparePaths() [2/2]
AI_FORCE_INLINE bool Assimp::IOSystem::ComparePaths |
( |
const std::string & |
one, |
|
|
const std::string & |
second |
|
) |
| const |
|
inline |
For backward compatibility.
- See also
- ComparePaths(const char*, const char*)
◆ CreateDirectory()
AI_FORCE_INLINE bool Assimp::IOSystem::CreateDirectory |
( |
const std::string & |
path | ) |
|
|
virtual |
CReates an new directory at the given path.
- Parameters
-
path | [in] The path to create. |
- Returns
- True, when a directory was created. False if the directory cannot be created.
Reimplemented in Assimp::MemoryIOSystem, and Assimp::FileSystemFilter.
◆ CurrentDirectory()
const AI_FORCE_INLINE std::string & Assimp::IOSystem::CurrentDirectory |
( |
| ) |
const |
|
virtual |
◆ DeleteFile()
AI_FORCE_INLINE bool Assimp::IOSystem::DeleteFile |
( |
const std::string & |
file | ) |
|
|
virtual |
◆ Exists() [1/2]
virtual bool Assimp::IOSystem::Exists |
( |
const char * |
pFile | ) |
const |
|
pure virtual |
◆ Exists() [2/2]
AI_FORCE_INLINE bool Assimp::IOSystem::Exists |
( |
const std::string & |
pFile | ) |
const |
For backward compatibility.
- See also
- Exists(const char*)
◆ getOsSeparator()
virtual char Assimp::IOSystem::getOsSeparator |
( |
| ) |
const |
|
pure virtual |
◆ Open() [1/2]
virtual IOStream* Assimp::IOSystem::Open |
( |
const char * |
pFile, |
|
|
const char * |
pMode = "rb" |
|
) |
| |
|
pure virtual |
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
-
pFile | Path to the file |
pMode | Desired 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.
Implemented in Assimp::ZipArchiveIOSystem, Assimp::MemoryIOSystem, JavaIOSystem, Assimp::FileSystemFilter, Assimp::CIOSystemWrapper, Assimp::TestIOSystem, Assimp::DefaultIOSystem, and Assimp::BlobIOSystem.
◆ Open() [2/2]
AI_FORCE_INLINE IOStream * Assimp::IOSystem::Open |
( |
const std::string & |
pFile, |
|
|
const std::string & |
pMode = std::string("rb") |
|
) |
| |
|
inline |
◆ PopDirectory()
◆ PushDirectory()
AI_FORCE_INLINE bool Assimp::IOSystem::PushDirectory |
( |
const std::string & |
path | ) |
|
|
virtual |
◆ StackSize()
The documentation for this class was generated from the following files: