feat(file): implemented file reading/writting #11

Merged
Mineplay merged 30 commits from feat/4-file into main 2025-12-21 06:12:09 -06:00
3 changed files with 14 additions and 5 deletions
Showing only changes of commit 59928a9a55 - Show all commits

4
.gitignore vendored
View file

@ -65,5 +65,7 @@ compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
build
# clangd
.cache/

View file

@ -9,7 +9,12 @@
#ifndef COSMS_CORE_FILE
#define COSMS_CORE_FILE
void cosms_core_file_read(char *path);
void cosms_core_file_write(char *path);
typedef enum {
COSMS_FILE_OK = 0,
COSMS_FILE_NOT_FOUND = -1,
} CosmsFileError;
CosmsFileError cosms_core_file_read(char *path);
CosmsFileError cosms_core_file_write(char *path);
#endif

View file

@ -10,10 +10,12 @@
#include <stdio.h>
void cosms_core_file_read(char *path) {
CosmsFileError cosms_core_file_read(char *path) {
printf("Hello, World!");
return COSMS_FILE_OK;
}
void cosms_core_file_write(char *path) {
CosmsFileError cosms_core_file_write(char *path) {
printf("Hello, World");
return COSMS_FILE_OK;
}