diff options
Diffstat (limited to 'filesystem/include')
| -rw-r--r-- | filesystem/include/filesystem.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/filesystem/include/filesystem.h b/filesystem/include/filesystem.h new file mode 100644 index 0000000..62bd7f0 --- /dev/null +++ b/filesystem/include/filesystem.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | /* | ||
| 2 | * Various filesystem utilities. | ||
| 3 | */ | ||
| 4 | #pragma once | ||
| 5 | |||
| 6 | #include <stdbool.h> | ||
| 7 | #include <stddef.h> | ||
| 8 | #include <stdio.h> | ||
| 9 | |||
| 10 | /// Get the file's size. | ||
| 11 | size_t get_file_size(FILE* file); | ||
| 12 | |||
| 13 | /// Read the entire contents of the file into memory. | ||
| 14 | void* read_file(const char* filepath); | ||
| 15 | |||
| 16 | /// Make a path relative to the parent directory of a file. | ||
| 17 | bool make_relative_path( | ||
| 18 | size_t max_path_length, const char* filepath, const char* path, | ||
| 19 | char* relative); | ||
