20#define fseek64 _fseeki64
21#define ftell64 _ftelli64
22#elif defined(__linux__)
29#error "Unsupported platform."
uint64_t u64
Definition basictypes.h:17
string * read_file_from_stream(arena_t *arena, FILE *stream)
Reads the contents of a file from stream into a string.
Definition file.c:48
string * read_file_bytes(arena_t *arena, const string *path, const u64 bytes)
Read bytes from a file path to string.
Definition file.c:93
u64 file_size_stream(FILE *stream)
Gets the size of a file from a file stream.
Definition file.c:17
u64 file_size(const string *path)
Gets the size of a file at path.
Definition file.c:31
u64 write_to_file(const string *path, const string *contents)
Write contents to file path.
Definition file.c:122
string * read_file_from_stream_bytes(arena_t *arena, FILE *stream, const u64 bytes)
Read bytes from file stream to string.
Definition file.c:79
u64 write_to_file_stream(FILE *stream, const string *contents)
Write contents to file stream.
Definition file.c:111
string * read_file(arena_t *arena, const string *path)
Reads the contents of a file at path into a string.
Definition file.c:62
u64 write_to_file_bytes(const string *path, const string *contents, const u64 bytes)
Write bytes from @contents to a file at path.
Definition file.c:153
u64 write_to_file_stream_bytes(FILE *stream, const string *contents, const u64 bytes)
Write bytes from contents to stream.
Definition file.c:140
An arena.
Definition arena.h:26