Core file utilities. More...
Functions | |
| kzsError | kzcFileGetExtension (const struct KzcMemoryManager *memoryManger, kzString filePath, kzMutableString *out_extension) |
| Get the file extension of a file with given path. More... | |
| kzsException | kzcFileReadBinaryFile (const struct KzcMemoryManager *memoryManager, kzString filePath, kzUint *out_size, kzByte **out_data) |
| Reads binary content of a file with given path. More... | |
| kzsException | kzcFileReadBinaryResource (const struct KzcMemoryManager *memoryManager, kzString resourcePath, kzUint *out_size, kzByte **out_data) |
| Reads binary content of a resource with given path. More... | |
| kzsException | kzcFileReadTextFile (const struct KzcMemoryManager *memoryManager, kzString filePath, kzMutableString *out_string) |
| Reads the data from the file system to the string with given path. More... | |
| kzsException | kzcFileReadTextFileLines (const struct KzcMemoryManager *memoryManager, kzString filePath, kzMutableString **out_lines) |
| Reads text lines of a file with given path. More... | |
| kzsException | kzcFileReadTextResource (const struct KzcMemoryManager *memoryManager, kzString filePath, kzMutableString *out_string) |
| Reads the data from a resource file to the string with given path. More... | |
| KANZI_API kzsException | kzcFileReadTextResourceLines (const struct KzcMemoryManager *memoryManager, kzString resourcePath, kzMutableString **out_lines) |
| Reads text lines of a resource file with given path. More... | |
| kzsException | kzcFileWriteBinaryFile (const struct KzcMemoryManager *memoryManager, kzString filePath, kzUint size, const kzByte *data) |
| Writes binary data to a file with given path. More... | |
| kzsException | kzcFileWriteTextFile (const struct KzcMemoryManager *memoryManager, kzString filePath, kzUint lineCount, const kzString *lines) |
| Writes text lines to a file with given path. More... | |
| kzBool | kzcFileExists (kzString filePath) |
| Returns true if file exists. More... | |
Core file utilities.
Copyright 2008-2020 by Rightware. All rights reserved.
| kzsError kzcFileGetExtension | ( | const struct KzcMemoryManager * | memoryManger, |
| kzString | filePath, | ||
| kzMutableString * | out_extension | ||
| ) |
Get the file extension of a file with given path.
| kzsException kzcFileReadBinaryFile | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | filePath, | ||
| kzUint * | out_size, | ||
| kzByte ** | out_data | ||
| ) |
Reads binary content of a file with given path.
The caller must free the returned data using kzcMemoryFreePointer().
| kzsException kzcFileReadBinaryResource | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | resourcePath, | ||
| kzUint * | out_size, | ||
| kzByte ** | out_data | ||
| ) |
Reads binary content of a resource with given path.
The caller must free the returned data using kzcMemoryFreePointer().
| kzsException kzcFileReadTextFile | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | filePath, | ||
| kzMutableString * | out_string | ||
| ) |
Reads the data from the file system to the string with given path.
| kzsException kzcFileReadTextFileLines | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | filePath, | ||
| kzMutableString ** | out_lines | ||
| ) |
Reads text lines of a file with given path.
| kzsException kzcFileReadTextResource | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | filePath, | ||
| kzMutableString * | out_string | ||
| ) |
Reads the data from a resource file to the string with given path.
The behavior is platform dependent. E.g. in Android, a "file" is something on the file system and a "resource" is inside APK. In Windows the path for "resources" can be configured.
| KANZI_API kzsException kzcFileReadTextResourceLines | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | resourcePath, | ||
| kzMutableString ** | out_lines | ||
| ) |
Reads text lines of a resource file with given path.
| kzsException kzcFileWriteBinaryFile | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | filePath, | ||
| kzUint | size, | ||
| const kzByte * | data | ||
| ) |
Writes binary data to a file with given path.
| kzsException kzcFileWriteTextFile | ( | const struct KzcMemoryManager * | memoryManager, |
| kzString | filePath, | ||
| kzUint | lineCount, | ||
| const kzString * | lines | ||
| ) |
Writes text lines to a file with given path.