APG
… ABNF Parser Generator
|
A few commonly used functions for reading and writing files. More...
#include "ApgUtilities.h"
Go to the source code of this file.
Functions | |
apg_uint | uiGetFileSize (const char *cpFileName) |
apg_uint | uiGetFile (const char *cpFileName, void *vpBuffer) |
apg_uint | uiWriteFile (const char *cpFileName, void *vpData, apg_uint uiDataLen) |
A few commonly used functions for reading and writing files.
Definition in file Files.c.
apg_uint uiGetFile | ( | const char * | cpFileName, |
void * | vpBuffer | ||
) |
Read an entire file into memory.
cpFileName | the name of the file to get |
vpBuffer | pointer to the memory area to read the file into. |
apg_uint uiGetFileSize | ( | const char * | cpFileName | ) |
Get the size of a file in bytes.
Useful when dynamically allocating a buffer for reading the entire file.
cpFileName | the name of the file whose size to get |
Write data into a file. If the file already exists its data is overwritten.
cpFileName | the name of the file to write |
vpData | pointer to the memory area to write. |
uiDataLen | the number of bytes of data to write |