Skip to main content

is_directory_not_empty

Function is_directory_not_empty 

Source
pub fn is_directory_not_empty(err: &Error) -> bool
Expand description

Returns true when an io::Error indicates a directory could not be removed because it still contained entries. The apply planner intentionally skips heddle-ignored entries (.git/, target/, node_modules/, etc.); when tracked content is removed and the parent directory still holds those ignored siblings, remove_dir returns this signal. We need both ErrorKind::DirectoryNotEmpty and the raw codes — Linux=39, macOS/BSD=66, Windows=145 — because Rust does not always translate every kernel surface into the portable ErrorKind.