pub fn move_to_trash(
file: &Path,
dry_run: bool,
trash_cmd: Option<&str>,
) -> Result<()>Expand description
Moves a file to the system trash, or uses a custom command if provided.
When using a custom command, {} in the command is replaced with the file path.
If {} is not present, the file path is appended to the command.
ยงErrors
Returns an error if the file cannot be moved to trash.