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.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/kit/file.h b/source/kit/file.h
index 68abea0..e85a076 100644
--- a/source/kit/file.h
+++ b/source/kit/file.h
@@ -17,12 +17,13 @@ extern "C" {
# define KIT_ENV_HOME "HOME"
#endif
-enum {
+typedef enum {
KIT_PATH_NONE,
KIT_PATH_FILE,
- KIT_PATH_FOLDER,
- KIT_FILE_SIZE_ERROR = -1
-};
+ KIT_PATH_FOLDER
+} kit_path_type_t;
+
+enum { KIT_FILE_SIZE_ERROR = -1 };
kit_string_t kit_path_norm(kit_str_t path, kit_allocator_t alloc);
@@ -46,7 +47,7 @@ kit_status_t kit_file_remove_folder(kit_str_t path);
kit_status_t kit_file_remove_recursive(kit_str_t path,
kit_allocator_t alloc);
-int kit_path_type(kit_str_t path);
+kit_path_type_t kit_path_type(kit_str_t path);
ptrdiff_t kit_file_size(kit_str_t path);
@@ -71,6 +72,7 @@ void kit_path_list_destroy(kit_path_list_t list);
# define file_remove_recursive kit_file_remove_recursive
# define path_type kit_path_type
# define file_size kit_file_size
+# define path_type_t kit_path_type_t
# define path_list_t kit_path_list_t
# define file_enum_folder kit_file_enum_folder
# define path_list_destroy kit_path_list_destroy