Loading...
Searching...
No Matches
io.h
Go to the documentation of this file.
#ifndef ARC_STD_IO_H_
#define ARC_STD_IO_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "arc/std/string.h"
/**
* @brief get string and size from file
*
* @param path a string to path of target file
* @param data pointer to where uint8_t array will be created
* this will need to be freed once done using it
* @param length length of the data read in
*/
void ARC_IO_ReadFileToUint8t(ARC_String *path, uint8_t **data, uint64_t *length);
/**
* @brief get string and size from file
*
* @param path a string to path of target file
* @param data pointer to where string will be created
* this will need to be freed once done using it
*/
void ARC_IO_FileToStr(ARC_String *path, ARC_String **data);
/**
* @brief write string to file
*
* @param path a string to path of target file
* @param data data to be written
*/
void ARC_IO_WriteStrToFile(ARC_String *path, ARC_String *data);
#ifdef __cplusplus
}
#endif
#endif //ARC_STD_IO_H_
ARC_IO_FileToStr
void ARC_IO_FileToStr(ARC_String *path, ARC_String **data)
get string and size from file
ARC_IO_WriteStrToFile
void ARC_IO_WriteStrToFile(ARC_String *path, ARC_String *data)
write string to file
ARC_IO_ReadFileToUint8t
void ARC_IO_ReadFileToUint8t(ARC_String *path, uint8_t **data, uint64_t *length)
get string and size from file
string.h
ARC_String
substring position within a string
Definition string.h:14