pub(crate) fn process(file: &str) -> Result<()>Expand description
Deletes one path after stripping the first ‘:’ suffix segment.
Performs metadata lookup, branches on filetype, and deletes a file, symlink, or directory. Emits colored error messages to stderr; caller aggregates failures.
§Errors
- Metadata retrieval failure (permissions, not found, etc.).
- Deletion failure (I/O error removing file or directory).
- Unsupported path type (reported as “Not found”).
§Performance
- Single metadata syscall plus one deletion syscall on success.
- No heap allocation besides error formatting.
§Future Work
- Distinguish success via a dedicated return type (e.g.
Result<Deleted, DeleteError>).