# shellcheck shell=bash
___x_cmd_path_obj_add_existed_folder_(){
    local pathdata="${1}"
    local dir="${2}"

    [ -d "$dir" ] || N=path M="Failed to add path[$dir], not a directory" log:ret:1

    ___x_cmd_path_obj_rm_ "$pathdata" "$dir" || return $?
    pathdata="$x_"
    ___x_cmd_path_obj_unshift_ "$pathdata" "$dir"
}

___x_cmd_path_obj_add_existed_folder(){
    local x_=""
    ___x_cmd_path_obj_add_existed_folder_ "$@" || return $?
    printf "%s\n" "$x_"
}


