summaryrefslogtreecommitdiff
path: root/source/kit/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/kit/file.h')
-rw-r--r--source/kit/file.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/source/kit/file.h b/source/kit/file.h
index b9988f1..a02d135 100644
--- a/source/kit/file.h
+++ b/source/kit/file.h
@@ -2,7 +2,6 @@
#define KIT_FILE_H
#include "dynamic_array.h"
-#include "status.h"
#include "string_builder.h"
#include <stdio.h>
@@ -28,7 +27,7 @@ typedef enum {
} kit_path_type_t;
typedef struct {
- kit_status_t status;
+ s32 status;
i64 time_modified_sec;
i32 time_modified_nsec;
@@ -36,16 +35,16 @@ typedef struct {
} kit_file_info_t;
typedef struct {
- kit_status_t status;
+ s32 status;
KIT_DA(kit_str_builder_t) files;
} kit_path_list_t;
enum { KIT_FILE_MAP_PRIVATE, KIT_FILE_MAP_SHARED };
typedef struct {
- kit_status_t status;
- i64 size;
- u8 *bytes;
+ s32 status;
+ i64 size;
+ u8 *bytes;
#if defined(_WIN32) && !defined(__CYGWIN__)
void *_file;
void *_map;
@@ -72,16 +71,15 @@ kit_str_t kit_path_index(kit_str_t path, i64 index);
kit_str_t kit_path_take(kit_str_t path, i64 count);
-kit_status_t kit_folder_create(kit_str_t path);
+s32 kit_folder_create(kit_str_t path);
-kit_status_t kit_folder_create_recursive(kit_str_t path);
+s32 kit_folder_create_recursive(kit_str_t path);
-kit_status_t kit_file_remove(kit_str_t path);
+s32 kit_file_remove(kit_str_t path);
-kit_status_t kit_folder_remove(kit_str_t path);
+s32 kit_folder_remove(kit_str_t path);
-kit_status_t kit_file_remove_recursive(kit_str_t path,
- kit_allocator_t *alloc);
+s32 kit_file_remove_recursive(kit_str_t path, kit_allocator_t *alloc);
kit_path_type_t kit_path_type(kit_str_t path);
@@ -93,8 +91,8 @@ kit_path_list_t kit_folder_enum(kit_str_t path,
void kit_path_list_destroy(kit_path_list_t list);
kit_mapped_file_t kit_file_map(kit_str_t path, i64 size, i32 mode);
-kit_status_t kit_file_sync(kit_mapped_file_t *mf);
-kit_status_t kit_file_unmap(kit_mapped_file_t *mf);
+s32 kit_file_sync(kit_mapped_file_t *mf);
+s32 kit_file_unmap(kit_mapped_file_t *mf);
#ifdef __cplusplus
}