Skip to main content

remove_tree

Function remove_tree 

Source
pub fn remove_tree(path: &Path) -> Result<()>
Expand description

What: Remove a directory tree, treating an already absent tree as removed. Why: Retired locks and transactions are removed by name after a rename; another process may have removed them first, which is the same end state (rm -rf with force).

In TS you’d write (pseudocode):

await rm(path, { recursive: true, force: true });