//! # Secure Unlinking
//!//! Handles the final removal of the file entry from the filesystem's
//! directory structure.
usecrate::error::ShredResult;usestd::fs;usestd::path::Path;/// A utility for performing secure file unlinking (deletion).
pubstructUnlinker;implUnlinker{/// Permanently removes the file entry from the filesystem.
////// This is the final step in the shredding process, performed only after
/// the data has been overwritten and the metadata has been obfuscated.
////// # Arguments
////// * `path` - The `Path` to the file to be unlinked.
////// # Errors
////// Returns `ShredError::Io` if the file cannot be removed (e.g., due to
/// permission constraints).
pubfnunlink(path:&Path)->ShredResult<()>{if path.exists(){fs::remove_file(path)?;}Ok(())}}