![]() |
ezEngine
Release 25.03
|
A base class for readers that handle reading from a (virtual) file inside a data directory. More...
#include <DataDirType.h>
Public Member Functions | |
ezDataDirectoryReader (ezInt32 iDataDirUserData) | |
virtual ezUInt64 | Read (void *pBuffer, ezUInt64 uiBytes)=0 |
virtual ezUInt64 | Skip (ezUInt64 uiBytes) |
Helper method to skip a number of bytes (implementations of the directory reader may implement this more efficiently for example) | |
![]() | |
ezDataDirectoryReaderWriterBase (ezInt32 iDataDirUserData, bool bIsReader) | |
The derived class should pass along whether it is a reader or writer. | |
ezResult | Open (ezStringView sFile, ezDataDirectoryType *pOwnerDataDirectory, ezFileShareMode::Enum fileShareMode) |
Used by ezDataDirectoryType's to try to open the given file. They need to pass along their own pointer. | |
void | Close () |
Closes this data stream. | |
const ezString128 & | GetFilePath () const |
Returns the relative path of this file within the owner data directory. | |
ezDataDirectoryType * | GetDataDirectory () const |
Returns the pointer to the data directory, which created this reader/writer. | |
bool | IsReader () const |
Returns true if this is a reader stream, false if it is a writer stream. | |
virtual ezUInt64 | GetFileSize () const =0 |
Returns the current total size of the file. | |
ezInt32 | GetDataDirUserData () const |
Additional Inherited Members | |
![]() | |
virtual ezResult | InternalOpen (ezFileShareMode::Enum FileShareMode)=0 |
This function must be implemented by the derived class. | |
virtual void | InternalClose ()=0 |
This function must be implemented by the derived class. | |
![]() | |
bool | m_bIsReader |
ezInt32 | m_iDataDirUserData = 0 |
ezDataDirectoryType * | m_pDataDirType |
ezString128 | m_sFilePath |
A base class for readers that handle reading from a (virtual) file inside a data directory.
Different data directory types (ZIP file, simple folder, etc.) use different reader/writer types.