Skip to main content

remove_old_tree

Function remove_old_tree 

Source
pub fn remove_old_tree(
    run: &mut Run<'_>,
    discard_unreadable: bool,
) -> Result<Option<Vec<Refusal>>, MigrateError>
Expand description

What: Delete the old tree of a finished migration. Ok(None) means it ran; Ok(Some(refusals)) means nothing was changed. Why: The files this user could not read exist only there, so a non-empty list refuses unless the person discards them explicitly. The deletion (remove_tree) unlinks entries, makes directories the user owns writable on the way, and never follows symbolic links.

In TS you’d write (pseudocode):

const refused = await removeOldTree(run, discardUnreadable);