resolve_destination_path

Function resolve_destination_path 

Source
pub fn resolve_destination_path(
    src_path_str: &str,
    dst_path_str: &str,
) -> Result<String>
Expand description

Resolves destination path handling trailing slash semantics for both local and remote paths.

This function implements the logic: “foo/bar -> baz/” becomes “foo/bar -> baz/bar” i.e., when destination ends with ‘/’, copy source INTO the directory.

§Arguments

  • src_path_str - Source path as string (before parsing)
  • dst_path_str - Destination path as string (before parsing)

§Returns

  • Ok(resolved_dst_path) - Destination path with trailing slash logic applied
  • Err(...) - If path resolution fails or invalid combination detected