#ifndef IO_H #define IO_H #ifdef __cplusplus extern "C" { #endif // __cplusplus #include "aliases.h" #include #include #include #include #define STREQ(S1, S2) (strcmp(S1, S2) == 0) #define STRNEQ(S1, S2, COUNT) (strncmp(S1, S2, COUNT) == 0) typedef struct dirwalk dirwalk_t; typedef struct { FILE *fp; bool reading; char name[NAME_MAX + 1]; } dirwalk_result_t; u64 get_file_length(FILE *fp); void read_entire_file(void *dst, FILE *fp); dirwalk_result_t walk_dir(dirwalk_t **dirwalk, const char *filepath); #ifdef __cplusplus } #endif // __cplusplus #endif // !IO_H