[−][src]Function trash::delete
pub fn delete<T: AsRef<Path>>(path: T) -> Result<(), Error>
Removes a single file or directory.
When a symbolic link is provided to this function, the sybolic link will be removed and the link target will be kept intact.
Example
use std::fs::File; use trash::delete; File::create("delete_me").unwrap(); trash::delete("delete_me").unwrap(); assert!(File::open("delete_me").is_err());