]> Kevux Git Server - fll/commitdiff
Update: Add recurse flag masks.
authorKevin Day <Kevin@kevux.org>
Sun, 13 Apr 2025 01:54:37 +0000 (20:54 -0500)
committerKevin Day <Kevin@kevux.org>
Sun, 13 Apr 2025 01:54:37 +0000 (20:54 -0500)
This adds `f_directory_recurse_do_flag_action_mask_e` and `f_directory_recurse_do_flag_top_mask_e`.
These are helper flags for existing flag sets as a convenience.

level_0/f_directory/c/directory/common.h

index d03b1a62aaef286fd86699b27ff96e0699219faa..8cd0bb0cc54eb6d1be3d6179890cc06d4615576d 100644 (file)
@@ -118,17 +118,19 @@ extern "C" {
  *   - top:         Operate on top-most directory, or for the callback parameter, designate that this is the top path.
  *   - top_after:   Operate on top-most directory, after the top-level directory is processed or recursed.
  *   - top_before:  Operate on top-most directory, before the top-level directory is processed or recursed.
+ *   - top_mask:    Helper flag representing the top, top_after, and top_before flags being set.
  *
- *   For the actiona and handle callback parameter:
- *   - block:      File is a block.
- *   - character:  File is a character.
- *   - directory:  File is a directory.
- *   - fifo:       File is a file-in/file-out.
- *   - link:       File is a link.
- *   - path:       The "name" represents a path rather than a file name (generally used for error handling or when not processing a recursed file).
- *   - regular:    File is a regular file.
- *   - socket:     File is a socket.
- *   - unknown:    File is an unknown type.
+ *   For the action and handle callback parameter:
+ *   - action_mask: Helper flag representing the action flags being set.
+ *   - block:       File is a block.
+ *   - character:   File is a character.
+ *   - directory:   File is a directory.
+ *   - fifo:        File is a file-in/file-out.
+ *   - link:        File is a link.
+ *   - path:        The "name" represents a path rather than a file name (generally used for error handling or when not processing a recursed file).
+ *   - regular:     File is a regular file.
+ *   - socket:      File is a socket.
+ *   - unknown:     File is an unknown type.
  */
 #ifndef _di_f_directory_recurse_do_flag_e_
   enum {
@@ -143,17 +145,19 @@ extern "C" {
     f_directory_recurse_do_flag_top_e         = 0x20,
     f_directory_recurse_do_flag_top_after_e   = 0x40,
     f_directory_recurse_do_flag_top_before_e  = 0x80,
+    f_directory_recurse_do_flag_top_mask_e    = 0xe0,
 
     // For the action callback parameter.
-    f_directory_recurse_do_flag_block_e     = 0x100,
-    f_directory_recurse_do_flag_character_e = 0x200,
-    f_directory_recurse_do_flag_directory_e = 0x400,
-    f_directory_recurse_do_flag_fifo_e      = 0x800,
-    f_directory_recurse_do_flag_link_e      = 0x1000,
-    f_directory_recurse_do_flag_path_e      = 0x2000,
-    f_directory_recurse_do_flag_regular_e   = 0x4000,
-    f_directory_recurse_do_flag_socket_e    = 0x8000,
-    f_directory_recurse_do_flag_unknown_e   = 0x10000,
+    f_directory_recurse_do_flag_action_mask_e = 0x1ff00,
+    f_directory_recurse_do_flag_block_e       = 0x100,
+    f_directory_recurse_do_flag_character_e   = 0x200,
+    f_directory_recurse_do_flag_directory_e   = 0x400,
+    f_directory_recurse_do_flag_fifo_e        = 0x800,
+    f_directory_recurse_do_flag_link_e        = 0x1000,
+    f_directory_recurse_do_flag_path_e        = 0x2000,
+    f_directory_recurse_do_flag_regular_e     = 0x4000,
+    f_directory_recurse_do_flag_socket_e      = 0x8000,
+    f_directory_recurse_do_flag_unknown_e     = 0x10000,
   }; // enum
 #endif // _di_f_directory_recurse_do_flag_e_