Rename the parameter options from "create" to "change".
It would be great to have a "create" option, but that is not available.
f_string_dynamics_resize(0, &setting->files);
kt_remove_dates_resize(0, &setting->accessed);
- kt_remove_dates_resize(0, &setting->created);
+ kt_remove_dates_resize(0, &setting->changed);
kt_remove_dates_resize(0, &setting->updated);
kt_remove_modes_resize(0, &setting->modes);
{
f_console_parameter_t * const parameters[] = {
&main->program.parameters.array[kt_remove_parameter_accessed_e],
- &main->program.parameters.array[kt_remove_parameter_created_e],
+ &main->program.parameters.array[kt_remove_parameter_changed_e],
&main->program.parameters.array[kt_remove_parameter_updated_e],
};
kt_remove_dates_t * const dates[] = {
&main->setting.accessed,
- &main->setting.created,
+ &main->setting.changed,
&main->setting.updated,
};
const f_string_static_t longs[] = {
kt_remove_long_accessed_s,
- kt_remove_long_created_s,
+ kt_remove_long_changed_s,
kt_remove_long_updated_s,
};
for (uint8_t p = 0; p < 3; ++p) {
- // kt_remove_parameter_accessed_e, kt_remove_parameter_created_e, kt_remove_parameter_updated_e, needs additional parameters, ==, <, <=, >, >=, <>.
+ // kt_remove_parameter_accessed_e, kt_remove_parameter_changed_e, kt_remove_parameter_updated_e, needs additional parameters, ==, <, <=, >, >=, <>.
if (parameters[p]->result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
* - block: Remove by file type: block.
* - character: Remove by file type: character.
* - copyright: Print copyright.
- * - created: Remove by created datetime.
+ * - changed: Remove by changed datetime.
* - different: Remove by user different from caller.
* - directory: Remove by file type: directory.
* - empty_only: Remove empty directories.
kt_remove_main_flag_block_e = 0x2,
kt_remove_main_flag_character_e = 0x4,
kt_remove_main_flag_copyright_e = 0x8,
- kt_remove_main_flag_created_e = 0x10,
+ kt_remove_main_flag_changed_e = 0x10,
kt_remove_main_flag_different_e = 0x20,
kt_remove_main_flag_directory_e = 0x40,
kt_remove_main_flag_empty_only_e = 0x80,
kt_remove_parameter_accessed_e,
kt_remove_parameter_block_e,
kt_remove_parameter_character_e,
- kt_remove_parameter_created_e,
+ kt_remove_parameter_changed_e,
kt_remove_parameter_different_e,
kt_remove_parameter_directory_e,
kt_remove_parameter_empty_e,
macro_f_console_parameter_t_initialize_3(kt_remove_short_accessed_s, kt_remove_long_accessed_s, 2, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(kt_remove_short_block_s, kt_remove_long_block_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(kt_remove_short_character_s, kt_remove_long_character_s, 0, f_console_flag_normal_e), \
- macro_f_console_parameter_t_initialize_3(kt_remove_short_created_s, kt_remove_long_created_s, 2, f_console_flag_normal_e), \
+ macro_f_console_parameter_t_initialize_3(kt_remove_short_changed_s, kt_remove_long_changed_s, 2, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(kt_remove_short_different_s, kt_remove_long_different_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(kt_remove_short_directory_s, kt_remove_long_directory_s, 0, f_console_flag_normal_e), \
macro_f_console_parameter_t_initialize_3(kt_remove_short_empty_s, kt_remove_long_empty_s, 1, f_console_flag_normal_e), \
const f_string_static_t kt_remove_short_accessed_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_accessed_s, 0, KT_REMOVE_short_accessed_s_length);
const f_string_static_t kt_remove_short_block_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_block_s, 0, KT_REMOVE_short_block_s_length);
const f_string_static_t kt_remove_short_character_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_character_s, 0, KT_REMOVE_short_character_s_length);
- const f_string_static_t kt_remove_short_created_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_created_s, 0, KT_REMOVE_short_created_s_length);
+ const f_string_static_t kt_remove_short_changed_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_changed_s, 0, KT_REMOVE_short_changed_s_length);
const f_string_static_t kt_remove_short_different_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_different_s, 0, KT_REMOVE_short_different_s_length);
const f_string_static_t kt_remove_short_directory_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_directory_s, 0, KT_REMOVE_short_directory_s_length);
const f_string_static_t kt_remove_short_empty_s = macro_f_string_static_t_initialize_1(KT_REMOVE_short_empty_s, 0, KT_REMOVE_short_empty_s_length);
const f_string_static_t kt_remove_long_accessed_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_accessed_s, 0, KT_REMOVE_long_accessed_s_length);
const f_string_static_t kt_remove_long_block_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_block_s, 0, KT_REMOVE_long_block_s_length);
const f_string_static_t kt_remove_long_character_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_character_s, 0, KT_REMOVE_long_character_s_length);
- const f_string_static_t kt_remove_long_created_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_created_s, 0, KT_REMOVE_long_created_s_length);
+ const f_string_static_t kt_remove_long_changed_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_changed_s, 0, KT_REMOVE_long_changed_s_length);
const f_string_static_t kt_remove_long_different_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_different_s, 0, KT_REMOVE_long_different_s_length);
const f_string_static_t kt_remove_long_directory_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_directory_s, 0, KT_REMOVE_long_directory_s_length);
const f_string_static_t kt_remove_long_empty_s = macro_f_string_static_t_initialize_1(KT_REMOVE_long_empty_s, 0, KT_REMOVE_long_empty_s_length);
#define KT_REMOVE_short_accessed_s "A"
#define KT_REMOVE_short_block_s "b"
#define KT_REMOVE_short_character_s "c"
- #define KT_REMOVE_short_created_s "C"
+ #define KT_REMOVE_short_changed_s "C"
#define KT_REMOVE_short_different_s "O"
#define KT_REMOVE_short_directory_s "d"
#define KT_REMOVE_short_empty_s "e"
#define KT_REMOVE_long_accessed_s "accessed"
#define KT_REMOVE_long_block_s "block"
#define KT_REMOVE_long_character_s "character"
- #define KT_REMOVE_long_created_s "created"
+ #define KT_REMOVE_long_changed_s "changed"
#define KT_REMOVE_long_different_s "different"
#define KT_REMOVE_long_directory_s "directory"
#define KT_REMOVE_long_empty_s "empty"
#define KT_REMOVE_short_accessed_s_length 1
#define KT_REMOVE_short_block_s_length 1
#define KT_REMOVE_short_character_s_length 1
- #define KT_REMOVE_short_created_s_length 1
+ #define KT_REMOVE_short_changed_s_length 1
#define KT_REMOVE_short_different_s_length 1
#define KT_REMOVE_short_directory_s_length 1
#define KT_REMOVE_short_empty_s_length 1
#define KT_REMOVE_long_accessed_s_length 8
#define KT_REMOVE_long_block_s_length 6
#define KT_REMOVE_long_character_s_length 9
- #define KT_REMOVE_long_created_s_length 7
+ #define KT_REMOVE_long_changed_s_length 7
#define KT_REMOVE_long_different_s_length 9
#define KT_REMOVE_long_directory_s_length 9
#define KT_REMOVE_long_empty_s_length 5
extern const f_string_static_t kt_remove_short_accessed_s;
extern const f_string_static_t kt_remove_short_block_s;
extern const f_string_static_t kt_remove_short_character_s;
- extern const f_string_static_t kt_remove_short_created_s;
+ extern const f_string_static_t kt_remove_short_changed_s;
extern const f_string_static_t kt_remove_short_different_s;
extern const f_string_static_t kt_remove_short_directory_s;
extern const f_string_static_t kt_remove_short_empty_s;
extern const f_string_static_t kt_remove_long_accessed_s;
extern const f_string_static_t kt_remove_long_block_s;
extern const f_string_static_t kt_remove_long_character_s;
- extern const f_string_static_t kt_remove_long_created_s;
+ extern const f_string_static_t kt_remove_long_changed_s;
extern const f_string_static_t kt_remove_long_different_s;
extern const f_string_static_t kt_remove_long_directory_s;
extern const f_string_static_t kt_remove_long_empty_s;
* files: An array of file names (full paths to the files) to remove.
*
* accessed: An array of last accessed dates used for comparison.
- * created: An array of created on dates used for comparison.
+ * changed: An array of changed on dates used for comparison.
* updated: An array of last updated dates used for comparison.
* modes: An array of modes used for comparison.
* groups: An array of Group IDs (gid_t) represented via an unsigned 32-bit integer.
f_string_dynamics_t files;
kt_remove_dates_t accessed;
- kt_remove_dates_t created;
+ kt_remove_dates_t changed;
kt_remove_dates_t updated;
kt_remove_modes_t modes;
f_uint32s_t groups;
// @todo add check here to see if file is a directory, apply any appropriate restrictions (such as not removing non-empty directories without force or recursive).
// @todo be sure too handle all of the remaining flags, such as tree, force, recurse, etc...:
- // - kt_remove_main_flag_accessed_e
- // - kt_remove_main_flag_created_e
// - kt_remove_main_flag_empty_only_e
// - kt_remove_main_flag_empty_only_fail_e
// - kt_remove_main_flag_empty_not_e
// - kt_remove_main_flag_prompt_once_e
// - kt_remove_main_flag_recurse_e
// - kt_remove_main_flag_tree_e
- // - kt_remove_main_flag_updated_e
kt_remove_print_simulate_operate_boolean(&main->program.output, kt_remove_remove_s, flag & kt_remove_flag_file_operate_remove_e);
fll_program_print_help_option(print, kt_remove_short_accessed_s, kt_remove_long_accessed_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Remove by file last accessed date and time.");
fll_program_print_help_option(print, kt_remove_short_block_s, kt_remove_long_block_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Remove by file type of block.");
fll_program_print_help_option(print, kt_remove_short_character_s, kt_remove_long_character_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Remove by file type of character.");
- fll_program_print_help_option(print, kt_remove_short_created_s, kt_remove_long_created_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Remove by file created on date and time.");
+ fll_program_print_help_option(print, kt_remove_short_changed_s, kt_remove_long_changed_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Remove by file changed on date and time.");
fll_program_print_help_option(print, kt_remove_short_different_s, kt_remove_long_different_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Remove by file owner by a user different from the current calling user.");
fll_program_print_help_option(print, kt_remove_short_directory_s, kt_remove_long_directory_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "Remove by file type of directory.");
fll_program_print_help_option(print, kt_remove_short_empty_s, kt_remove_long_empty_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Remove directory by a specific empty or not empty state.");
);
fl_print_format(" The parameters '%[%r%r%]', ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_accessed_s, context.set.notable);
- fl_print_format("'%[%r%r%]', ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_created_s, context.set.notable);
+ fl_print_format("'%[%r%r%]', ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_changed_s, context.set.notable);
fl_print_format("'%[%r%r%]', ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_group_s, context.set.notable);
fl_print_format("'%[%r%r%]', ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_mode_s, context.set.notable);
fl_print_format("'%[%r%r%]', and ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_updated_s, context.set.notable);
fl_print_format(" or '%[u+rwX,g+r%]'.%r%r", print->to, context.set.notable, context.set.notable, f_string_eol_s, f_string_eol_s);
fl_print_format(" The date related parameters are: '%[%r%r%]', ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_accessed_s, context.set.notable);
- fl_print_format("'%[%r%r%]', and ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_created_s, context.set.notable);
+ fl_print_format("'%[%r%r%]', and ", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_changed_s, context.set.notable);
fl_print_format("'%[%r%r%]'.%r%r", print->to, context.set.notable, f_console_symbol_long_normal_s, kt_remove_long_updated_s, context.set.notable, f_string_eol_s, f_string_eol_s);
+ fl_print_format(" Where '%[updated%]' refers to when the contents of a file have been changed and '%[changed%]' refers to when the filesystem data for that file have been changed.%r%r", print->to, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s, f_string_eol_s);
+
fl_print_format(" The first value to the date related parameters must be any of the following comparison operators:%r", print->to, f_string_eol_s);
fl_print_format(" - '%[%r%]'", print->to, context.set.notable, kt_remove_date_symbol_equal_s, context.set.notable);
fl_print_format(" or '%[%r%]': Date match using an equal to operation.%r", print->to, context.set.notable, kt_remove_date_word_equal_s, context.set.notable, f_string_eol_s);
{
kt_remove_dates_t * const dates[] = {
&main->setting.accessed,
- &main->setting.created,
+ &main->setting.changed,
&main->setting.updated,
};
const f_string_static_t * const names[] = {
&kt_remove_long_accessed_s,
- &kt_remove_long_created_s,
+ &kt_remove_long_changed_s,
&kt_remove_long_updated_s,
};