2019-06-15 11:00:59 -07:00
|
|
|
#ifndef FILE_H_
|
|
|
|
#define FILE_H_
|
|
|
|
|
|
|
|
#include <time.h>
|
2019-08-10 19:54:33 -07:00
|
|
|
#ifdef _WIN32
|
2019-11-30 11:41:57 -08:00
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2019-08-10 19:54:33 -07:00
|
|
|
#include <windows.h>
|
|
|
|
#endif
|
2019-06-22 12:27:47 -07:00
|
|
|
#ifndef _WIN32
|
|
|
|
#include <dirent.h>
|
|
|
|
#endif
|
2019-06-15 11:00:59 -07:00
|
|
|
|
2019-12-15 08:55:38 -08:00
|
|
|
#include "system/s.h"
|
|
|
|
|
2019-06-22 12:27:47 -07:00
|
|
|
#ifdef _WIN32
|
|
|
|
struct dirent
|
|
|
|
{
|
2019-08-10 19:54:33 -07:00
|
|
|
char d_name[MAX_PATH+1];
|
2019-06-22 12:27:47 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct DIR DIR;
|
|
|
|
|
|
|
|
DIR *opendir(const char *name);
|
|
|
|
struct dirent *readdir(DIR *dirp);
|
|
|
|
void closedir(DIR *dirp);
|
|
|
|
#endif
|
|
|
|
|
2020-01-04 12:53:35 -08:00
|
|
|
String read_whole_file(Memory *memory, const char *filepath);
|
2019-12-15 08:55:38 -08:00
|
|
|
|
2019-06-15 11:00:59 -07:00
|
|
|
#endif // FILE_H_
|