Skip to main content

remove_tree

Function remove_tree 

Source
pub fn remove_tree(
    root: &FsRoot,
    target: &Path,
    dry_run: bool,
    limit: usize,
) -> TreeOutcome
Expand description

target 아래를 전부 세고, dry_run이 아니면 제거한다.

자식을 먼저 처리하고 부모를 나중에 처리한다 — 반대로 하면 부모를 지운 뒤 자식을 셀 수 없다.

심볼릭 링크는 따라가지 않는다. 링크는 그 자체가 한 항목이고, platform::remove_entry가 플랫폼별 올바른 제거(Windows 디렉터리 reparse point 포함)를 한다. 따라가면 트리 밖을 지운다.