Resource file reading functions. More...
#include <kanzi/core/core_api.hpp>#include <kanzi/core/cpp/cstddef.hpp>#include <kanzi/core/legacy/debug/kzs_error.hpp>#include <kanzi/core/legacy/kzs_types.hpp>Macros | |
| #define | KZS_RESOURCE_FILE_ERROR |
| Result value indicating that an error occurred in the function. | |
Functions | |
| KZ_DEPRECATED kzsError | kzsResourceFileCreate (kzString resourceDirectory, kzString resourcePath, struct KzsResourceFile **out_resourceFile) |
| Opens a resource. | |
| KZ_DEPRECATED kzsError | kzsResourceFileDelete (struct KzsResourceFile *resourceFile) |
| Closes a resource. | |
| KZ_DEPRECATED kzBool | kzsResourceFileExists (kzString resourcePath) |
| Returns true if resource exists. | |
| KZ_DEPRECATED kzUint | kzsResourceFileGetPosition (const struct KzsResourceFile *resourceFile) |
| Gets the current position in a resource. | |
| KZ_DEPRECATED kzInt | kzsResourceFileGetSize (const struct KzsResourceFile *resourceFile) |
| Returns the size of the resource file in bytes. | |
| KZ_DEPRECATED kzInt | kzsResourceFileRead (struct KzsResourceFile *resourceFile, kzUint byteCount, kanzi::byte *out_buffer) |
| Reads bytes from a resource. | |
| KZ_DEPRECATED kzInt | kzsResourceFileSkip (struct KzsResourceFile *resourceFile, kzUint byteCount) |
| Skips bytes from a resource. | |
Resource file reading functions.
Resource files provide simplified API for reading files (but not writing). This is the recommended API for reading resource files of the application, when full file-system API is not available on a platform.
Copyright 2008-2017 by Rightware. All rights reserved.
| #define KZS_RESOURCE_FILE_ERROR |
Result value indicating that an error occurred in the function.
| KZ_DEPRECATED kzsError kzsResourceFileCreate | ( | kzString | resourceDirectory, |
| kzString | resourcePath, | ||
| struct KzsResourceFile ** | out_resourceFile ) |
Opens a resource.
| KZ_DEPRECATED kzsError kzsResourceFileDelete | ( | struct KzsResourceFile * | resourceFile | ) |
Closes a resource.
| KZ_DEPRECATED kzInt kzsResourceFileRead | ( | struct KzsResourceFile * | resourceFile, |
| kzUint | byteCount, | ||
| kanzi::byte * | out_buffer ) |
Reads bytes from a resource.
Returns the number of bytes read. Returns 0 if no bytes could be read, because the resource has been completely finished. Returns KZS_RESOURCE_FILE_ERROR if an error occurred.
| KZ_DEPRECATED kzInt kzsResourceFileSkip | ( | struct KzsResourceFile * | resourceFile, |
| kzUint | byteCount ) |
Skips bytes from a resource.
Returns the number of bytes skipped. Returns 0 if no bytes could be skipped, because the resource has been completely finished. Returns KZS_RESOURCE_FILE_ERROR if an error occurred.
| KZ_DEPRECATED kzUint kzsResourceFileGetPosition | ( | const struct KzsResourceFile * | resourceFile | ) |
Gets the current position in a resource.
| KZ_DEPRECATED kzBool kzsResourceFileExists | ( | kzString | resourcePath | ) |
Returns true if resource exists.
| KZ_DEPRECATED kzInt kzsResourceFileGetSize | ( | const struct KzsResourceFile * | resourceFile | ) |
Returns the size of the resource file in bytes.