Skip to main content

cmd_delete

Function cmd_delete 

Source
pub fn cmd_delete(mana_dir: &Path, id: &str) -> Result<()>
Expand description

Delete a unit and clean up all references to it in other units’ dependencies.

  1. Load the unit to get its title (for printing)
  2. Delete the unit file
  3. Scan all remaining units and remove deleted_id from their dependencies
  4. Rebuild the index