Function gix_fs::dir::remove::empty_depth_first
source · pub fn empty_depth_first(delete_dir: PathBuf) -> Result<()>
Expand description
Delete all empty directories reachable from delete_dir
from empty leaves moving upward to and including delete_dir
.
If any encountered directory contains a file the entire operation is aborted. Please note that this is inherently racy and no attempts are made to counter that, which will allow creators to win as long as they retry.