HDK
|
#include <filesystemAsset.h>
Public Member Functions | |
AR_API | ArFilesystemAsset (FILE *file) |
AR_API | ~ArFilesystemAsset () |
Closes the file owned by this object. More... | |
virtual AR_API size_t | GetSize () override |
Returns the size of the file held by this object. More... | |
virtual AR_API std::shared_ptr < const char > | GetBuffer () override |
virtual AR_API size_t | Read (void *buffer, size_t count, size_t offset) override |
virtual AR_API std::pair< FILE *, size_t > | GetFileUnsafe () override |
![]() | |
virtual AR_API | ~ArAsset () |
ArAsset (const ArAsset &)=delete | |
ArAsset & | operator= (const ArAsset &)=delete |
Additional Inherited Members | |
![]() | |
AR_API | ArAsset () |
ArAsset implementation for asset represented by a file on a filesystem.
Definition at line 41 of file filesystemAsset.h.
|
explicit |
Constructs an ArFilesystemAsset for the given file
. The ArFilesystemAsset object takes ownership of file
and will close the file handle on destruction.
AR_API ArFilesystemAsset::~ArFilesystemAsset | ( | ) |
Closes the file owned by this object.
Creates a read-only memory map for the file held by this object and returns a pointer to the start of the mapped contents.
Implements ArAsset.
|
overridevirtual |
Returns the FILE* handle this object was created with and an offset of 0, since the asset's contents are located at the beginning of the file.
Implements ArAsset.
|
overridevirtual |
Returns the size of the file held by this object.
Implements ArAsset.
|
overridevirtual |
Reads count
bytes from the file held by this object at the given offset
into buffer
.
Implements ArAsset.