fn match_flag_argument(flag: char, argument: &str) -> i32 {
    // TODO: Implement missing flags
    match flag {
        'b' => file_is_block_device(argument),
        'c' => file_is_character_device(argument),
        'd' => file_is_directory(argument),
        'e' => file_exists(argument),
        'f' => file_is_regular(argument),
        //'g' => file_is_set_group_id(argument),
        //'G' => file_is_owned_by_effective_group_id(argument),
        'h' | 'L' => file_is_symlink(argument),
        //'k' => file_has_sticky_bit(argument),
        //'O' => file_is_owned_by_effective_user_id(argument),
        //'p' => file_is_named_pipe(argument),
        'r' => file_has_read_permission(argument),
        's' => file_size_is_greater_than_zero(argument),
        'S' => file_is_socket(argument),
        //'t' => file_descriptor_is_opened_on_a_terminal(argument),
        'w' => file_has_write_permission(argument),
        'x' => file_has_execute_permission(argument),
        'n' => string_is_nonzero(argument),
        'z' => string_is_zero(argument),
        _ => SUCCESS,
    }
}
/// Matches flag arguments to their respective functionaity when the `-` character is detected.
Matches flag arguments to their respective functionaity when the `-` character is detected.
Matches flag arguments to their respective functionaity when the ` - ` character is detected .
fn match_flag_argument(flag: char, argument: &str) -> i32 {
    // TODO: Implement missing flags
    match flag {
        'b' => file_is_block_device(argument),
        'c' => file_is_character_device(argument),
        'd' => file_is_directory(argument),
        'e' => file_exists(argument),
        'f' => file_is_regular(argument),
        //'g' => file_is_set_group_id(argument),
        //'G' => file_is_owned_by_effective_group_id(argument),
        'h' | 'L' => file_is_symlink(argument),
        //'k' => file_has_sticky_bit(argument),
        //'O' => file_is_owned_by_effective_user_id(argument),
        //'p' => file_is_named_pipe(argument),
        'r' => file_has_read_permission(argument),
        's' => file_size_is_greater_than_zero(argument),
        'S' => file_is_socket(argument),
        //'t' => file_descriptor_is_opened_on_a_terminal(argument),
        'w' => file_has_write_permission(argument),
        'x' => file_has_execute_permission(argument),
        'n' => string_is_nonzero(argument),
        'z' => string_is_zero(argument),
        _ => SUCCESS,
    }
}
fn match_flag_argument ( flag : char , argument : & str ) -> i32 { // TODO: Implement missing flags match flag { 'b' => file_is_block_device ( argument ) , 'c' => file_is_character_device ( argument ) , 'd' => file_is_directory ( argument ) , 'e' => file_exists ( argument ) , 'f' => file_is_regular ( argument ) , //'g' => file_is_set_group_id(argument), //'G' => file_is_owned_by_effective_group_id(argument), 'h' | 'L' => file_is_symlink ( argument ) , //'k' => file_has_sticky_bit(argument), //'O' => file_is_owned_by_effective_user_id(argument), //'p' => file_is_named_pipe(argument), 'r' => file_has_read_permission ( argument ) , 's' => file_size_is_greater_than_zero ( argument ) , 'S' => file_is_socket ( argument ) , //'t' => file_descriptor_is_opened_on_a_terminal(argument), 'w' => file_has_write_permission ( argument ) , 'x' => file_has_execute_permission ( argument ) , 'n' => string_is_nonzero ( argument ) , 'z' => string_is_zero ( argument ) , _ => SUCCESS , } }
Matches flag arguments to their respective functionaity when the `-` character is detected.
Matches flag arguments to their respective functionaity when the ` - ` character is detected .
flag
char
argument
&str