Added file IO operations, and argument parcing

This commit is contained in:
2025-06-20 17:51:35 +01:00
parent 781276aad7
commit 2c056ef45e
51 changed files with 2060 additions and 3206 deletions
+10
View File
@@ -0,0 +1,10 @@
#include "files.h"
u_char file_exists(const char *filename) {
FILE *file = fopen(filename, "r");
if (file) {
fclose(file);
return 1; // File exists
}
return 0; // File does not exist
}
+10
View File
@@ -0,0 +1,10 @@
#ifndef FILES__H_INCLUDED
#define FILES__H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
u_char file_exists(const char *filename);
#endif // FILES__H_INCLUDED