Skip to main content

plan_on_one_host

Function plan_on_one_host 

Source
fn plan_on_one_host(
    kind: FsOpKind,
    src: &End,
    sources: &[(String, String)],
    dest: &End,
    dest_dir: &str,
) -> Result<Vec<Item>, String>
Expand description

The local plan’s rules (jobs::plan) where source and destination are one host’s folders: a folder never into itself or a folder of its own; a move into the folder it is in is nothing to do, a copy there is a duplicate; and no destination lands on a folder holding another source. Between two machines none of this can happen. sources are (as given, resolved) pairs: the resolved one has its parent’s links resolved (Realpath), its own name kept, so a link to an ancestor isn’t taken for the ancestor; dest_dir is resolved too.