Skip to main content

remove_dir

Function remove_dir 

Source
pub fn remove_dir<R: RawKv>(
    raw: &mut R,
    path: &[&[u8]],
) -> Result<bool, FlatError<R::Error>>
Expand description

Remove the directory at path and its entire subtree (the layer’s remove_internal + remove_recursive + remove_from_parent, verbatim operation order): recurse into every child, clear the directory’s data region, clear the node’s own rows, then delete the child row in the (re-found) parent, tolerating a missing parent.

Ok(false) when the path does not exist. An empty path is the layer root and is not removable; the fasm mapping never passes one (the fasm root directory is rejected before reaching this function).