aboutsummaryrefslogtreecommitdiff
path: root/src/io/file.h
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-30 01:31:15 +0200
committerhachem <im@hachem.wtf>2026-08-30 01:31:15 +0200
commitd235876f94f84dca15520a20bb476b916b927afb (patch)
tree3f87c62a55e76f0ba55efcc3ccb867f161ad2aa0 /src/io/file.h
parent11d3e0294d6c4d657c45c6f8de23dd628b61680d (diff)
add: read files into memory
Diffstat (limited to 'src/io/file.h')
-rw-r--r--src/io/file.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/io/file.h b/src/io/file.h
new file mode 100644
index 0000000..7d15bd0
--- /dev/null
+++ b/src/io/file.h
@@ -0,0 +1,13 @@
+#pragma once
+
+#include <stddef.h>
+#include <stdbool.h>
+
+struct File
+{
+ char* data;
+ size_t size;
+};
+
+bool read_file(const char* path, struct File* out);
+void free_file(struct File* file);