Skip to main content

remove_tree

Function remove_tree 

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

What: Remove path, whatever it is: a file or link is unlinked, a directory is emptied and removed. Why: Links are never followed; see the module description for the permissions and the boundaries. The empty directory that remains is removed by name from the parent that was opened first, which succeeds only if it is still empty.

In TS you’d write (pseudocode):

await removeTree(path);