pub fn copy_host_dir(
from: &Path,
to: &Path,
cap: u64,
bytes: &mut u64,
) -> Result<(), CopyDirError>Expand description
Copies the host directory from to to, adding the bytes copied to bytes and stopping
once they pass cap.
Nothing under from is followed: every entry is opened relative to its already open
parent without following links, so a program swapping an entry for a link mid-copy
cannot get a file from outside the tree copied. A link is recreated as a link; an entry
removed meanwhile is skipped. Only from itself, which the caller vouches for, is
resolved by path.