2022-06-29 10:58:49 +02:00
|
|
|
#ifndef IO_H
|
|
|
|
#define IO_H
|
|
|
|
|
|
|
|
#include <errno.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
2022-06-29 11:08:31 +02:00
|
|
|
/**
|
|
|
|
* @brief reads a file at a path
|
2022-06-29 11:12:35 +02:00
|
|
|
*
|
2022-06-29 11:08:31 +02:00
|
|
|
* @param path the filepath
|
|
|
|
* @param size a pointer where the size of the result should be stored
|
|
|
|
* @return the raw data
|
|
|
|
*/
|
|
|
|
static uint8_t* read_file(const char* path, size_t* size);
|
|
|
|
|
|
|
|
#endif // IO_H
|