]> Kevux Git Server - fll/commitdiff
Update: add file type name strings and lengths.
authorKevin Day <thekevinday@gmail.com>
Sat, 29 Aug 2020 03:18:42 +0000 (22:18 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 29 Aug 2020 03:18:42 +0000 (22:18 -0500)
level_0/f_file/c/file.h

index 78e85733bbc4449a5c3e6075698d28ecdd81fad0..f2e961e20d5a9b8666ff0a467335697eb5d041b3 100644 (file)
@@ -84,6 +84,22 @@ extern "C" {
   #define f_file_type_regular   S_IFREG
   #define f_file_type_socket    S_IFSOCK
 
+  #define f_file_type_name_block     "block"
+  #define f_file_type_name_character "character"
+  #define f_file_type_name_directory "directory"
+  #define f_file_type_name_fifo      "fifo"
+  #define f_file_type_name_link      "link"
+  #define f_file_type_name_regular   "regular"
+  #define f_file_type_name_socket    "socket"
+
+  #define f_file_type_name_block_length     5
+  #define f_file_type_name_character_length 9
+  #define f_file_type_name_directory_length 9
+  #define f_file_type_name_fifo_length      4
+  #define f_file_type_name_link_length      4
+  #define f_file_type_name_regular_length   7
+  #define f_file_type_name_socket_length    6
+
   #define f_macro_file_type_get(mode) (f_file_type_mask & mode)
 
   #define f_macro_file_type_is_block(mode)     f_macro_file_type_get(mode) == f_file_type_block