From c95d83ffe72f3ffaa247819c2cbb0bd942ebd599 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 12 Apr 2025 20:54:37 -0500 Subject: [PATCH] Update: Add recurse flag masks. 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 | 42 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/level_0/f_directory/c/directory/common.h b/level_0/f_directory/c/directory/common.h index d03b1a6..8cd0bb0 100644 --- a/level_0/f_directory/c/directory/common.h +++ b/level_0/f_directory/c/directory/common.h @@ -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_ -- 1.8.3.1