|
Archeus 0.0.0
A C library and game engine that focuses on documentation
|
#include "arc/std/io.h"#include "arc/std/errno.h"#include "arc/std/string.h"#include <stdio.h>#include <stdlib.h>Go to the source code of this file.
Functions | |
| void | ARC_IO_ReadFileToUint8t (ARC_String *path, uint8_t **data, uint64_t *length) |
| get string and size from file | |
| void | ARC_IO_FileToStr (ARC_String *path, ARC_String **data) |
| get string and size from file | |
| void | ARC_IO_WriteStrToFile (ARC_String *path, ARC_String *data) |
| write string to file | |
| void ARC_IO_FileToStr | ( | ARC_String * | path, |
| ARC_String ** | data ) |
get string and size from file
| path | a string to path of target file |
| data | pointer to where string will be created this will need to be freed once done using it |
Definition at line 43 of file io.c.
References ARC_DEBUG_LOG_ERROR, ARC_DEBUG_LOG_ERROR_WITH_VARIABLES, arc_errno, ARC_ERRNO_COPY, ARC_ERRNO_NULL, ARC_String_Create(), and ARC_String::data.
Referenced by ARC_Config_FileIO(), ARC_Lexer_LexFile(), and ARC_Parser_ParseFile().
| void ARC_IO_ReadFileToUint8t | ( | ARC_String * | path, |
| uint8_t ** | data, | ||
| uint64_t * | length ) |
get string and size from file
| path | a string to path of target file |
| data | pointer to where uint8_t array will be created this will need to be freed once done using it |
| length | length of the data read in |
Definition at line 8 of file io.c.
References ARC_DEBUG_LOG_ERROR, ARC_DEBUG_LOG_ERROR_WITH_VARIABLES, arc_errno, ARC_ERRNO_COPY, ARC_ERRNO_NULL, and ARC_String::data.
| void ARC_IO_WriteStrToFile | ( | ARC_String * | path, |
| ARC_String * | data ) |
write string to file
| path | a string to path of target file |
| data | data to be written |
Definition at line 77 of file io.c.
References ARC_DEBUG_LOG_ERROR, ARC_DEBUG_LOG_ERROR_WITH_VARIABLES, arc_errno, ARC_ERRNO_COPY, ARC_ERRNO_NULL, ARC_String::data, and ARC_String::length.