Kanzi  3.9.6
Kanzi Engine API
kzs_resource_file.hpp File Reference

Resource file reading functions. More...

Macros

#define KZS_RESOURCE_FILE_ERROR
 Result value indicating that an error occurred in the function. More...
 

Functions

KZ_DEPRECATED kzsError kzsResourceFileCreate (kzString resourceDirectory, kzString resourcePath, struct KzsResourceFile **out_resourceFile)
 Opens a resource. More...
 
KZ_DEPRECATED kzsError kzsResourceFileDelete (struct KzsResourceFile *resourceFile)
 Closes a resource. More...
 
KZ_DEPRECATED kzBool kzsResourceFileExists (kzString resourcePath)
 Returns true if resource exists. More...
 
KZ_DEPRECATED kzUint kzsResourceFileGetPosition (const struct KzsResourceFile *resourceFile)
 Gets the current position in a resource. More...
 
KZ_DEPRECATED kzInt kzsResourceFileGetSize (const struct KzsResourceFile *resourceFile)
 Returns the size of the resource file in bytes. More...
 
KZ_DEPRECATED kzInt kzsResourceFileRead (struct KzsResourceFile *resourceFile, kzUint byteCount, kanzi::byte *out_buffer)
 Reads bytes from a resource. More...
 
KZ_DEPRECATED kzInt kzsResourceFileSkip (struct KzsResourceFile *resourceFile, kzUint byteCount)
 Skips bytes from a resource. More...
 

Detailed Description

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.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.

Copyright 2008-2017 by Rightware. All rights reserved.

Macro Definition Documentation

◆ KZS_RESOURCE_FILE_ERROR

#define KZS_RESOURCE_FILE_ERROR

Result value indicating that an error occurred in the function.

Function Documentation

◆ kzsResourceFileCreate()

KZ_DEPRECATED kzsError kzsResourceFileCreate ( kzString  resourceDirectory,
kzString  resourcePath,
struct KzsResourceFile **  out_resourceFile 
)

Opens a resource.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.

◆ kzsResourceFileDelete()

KZ_DEPRECATED kzsError kzsResourceFileDelete ( struct KzsResourceFile resourceFile)

Closes a resource.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.

◆ kzsResourceFileRead()

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.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.

◆ kzsResourceFileSkip()

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.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.

◆ kzsResourceFileGetPosition()

KZ_DEPRECATED kzUint kzsResourceFileGetPosition ( const struct KzsResourceFile resourceFile)

Gets the current position in a resource.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.

◆ kzsResourceFileExists()

KZ_DEPRECATED kzBool kzsResourceFileExists ( kzString  resourcePath)

Returns true if resource exists.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided in the filesystem namespace.

◆ kzsResourceFileGetSize()

KZ_DEPRECATED kzInt kzsResourceFileGetSize ( const struct KzsResourceFile resourceFile)

Returns the size of the resource file in bytes.

Deprecated:
In Kanzi 3.9.6. Use the functionality provided by the kanzi::ReadOnlyDiskFile class.