#ifndef IO_H #define IO_H #include "aliases.h" #include #include #include #define STREQ(S1, S2) (strcmp(S1, S2) == 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, u64 length, FILE *fp); dirwalk_result_t walk_dir(dirwalk_t **dirwalk, const char *filepath); #endif // !IO_H