|
| AssetFile (const char *filename) |
| Constructs an asset file object.
|
|
void | open (unsigned char mode) override |
| Tries to open the asset file.
|
|
void | close () override |
| Closes the asset file.
|
|
long int | seek (long int offset, int whence) const override |
| Seeks in an opened file.
|
|
long int | tell () const override |
| Tells the seek position of an opened file.
|
|
unsigned long int | read (void *buffer, unsigned long int bytes) const override |
| Reads a certain amount of bytes from the file to a buffer.
|
|
unsigned long int | write (const void *buffer, unsigned long int bytes) override |
| Writes a certain amount of bytes from a buffer to the file.
|
|
bool | isOpened () const override |
| Returns true if the file has been sucessfully opened.
|
|
| IFile (const char *filename) |
| Constructs a base file object.
|
|
FileType | type () const |
| Returns the file type (RTTI)
|
|
void | setCloseOnDestruction (bool shouldCloseOnDestruction) |
| Sets the close on destruction flag.
|
|
const char * | filename () const |
| Returns file name with path.
|
|
int | fd () const |
| Returns file descriptor.
|
|
FILE * | ptr () const |
| Returns file stream pointer.
|
|
unsigned long int | size () const |
| Returns file size in bytes.
|
|
virtual const void * | bufferPtr () const |
| Returns the constant buffer pointer of a memory file or nullptr for other file types.
|
|
virtual void * | bufferPtr () |
| Returns the buffer pointer of a memory file or nullptr for other file types.
|
|
|
static void | initAssetManager (struct android_app *state) |
| Sets the global pointer to the AAssetManager.
|
|
static const char * | assetPath (const char *path) |
| Returns the path of an Android asset without the prefix.
|
|
static bool | tryOpen (const char *path) |
| Checks if an asset path exists as a file or as a directory and can be opened.
|
|
static bool | tryOpenFile (const char *path) |
| Checks if an asset path exists and can be opened as a file.
|
|
static bool | tryOpenDirectory (const char *path) |
| Checks if an asset path exists and can be opened as a directory.
|
|
static off_t | length (const char *path) |
| Returns the total size of the asset data.
|
|
static AAssetDir * | openDir (const char *dirName) |
|
static void | closeDir (AAssetDir *assetDir) |
|
static void | rewindDir (AAssetDir *assetDir) |
|
static const char * | nextFileName (AAssetDir *assetDir) |
|
static uint16_t | int16FromLE (uint16_t number) |
| Reads a little endian 16 bit unsigned integer.
|
|
static uint32_t | int32FromLE (uint32_t number) |
| Reads a little endian 32 bit unsigned integer.
|
|
static uint64_t | int64FromLE (uint64_t number) |
| Reads a little endian 64 bit unsigned integer.
|
|
static uint16_t | int16FromBE (uint16_t number) |
| Reads a big endian 16 bit unsigned integer.
|
|
static uint32_t | int32FromBE (uint32_t number) |
| Reads a big endian 32 bit unsigned integer.
|
|
static uint64_t | int64FromBE (uint64_t number) |
| Reads a big endian 64 bit unsigned integer.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (const char *bufferName, unsigned char *bufferPtr, unsigned long int bufferSize) |
| Returns a memory file with the specified name.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (const char *bufferName, const unsigned char *bufferPtr, unsigned long int bufferSize) |
| Returns a read-only memory file with the specified name.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (unsigned char *bufferPtr, unsigned long int bufferSize) |
| Returns a memory file.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (const unsigned char *bufferPtr, unsigned long int bufferSize) |
| Returns a read-only memory file.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (const char *bufferName, unsigned long int bufferSize) |
| Returns a memory file with the specified name, that allocates a buffer of the specified size.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (unsigned long int bufferSize) |
| Returns a memory file that allocates a buffer of the specified size.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (const char *bufferName, nctl::UniquePtr< unsigned char[]> buffer, unsigned long int bufferSize) |
| Returns a memory file with the specified name, that takes ownership of the specified buffer.
|
|
static nctl::UniquePtr< IFile > | createFromMemory (nctl::UniquePtr< unsigned char[]> buffer, unsigned long int bufferSize) |
| Returns a memory file that takes ownership of the specified buffer.
|
|
static nctl::UniquePtr< IFile > | createFileHandle (const char *filename) |
| Returns the proper file handle according to prepended tags.
|
|
The class dealing with Android asset files.