Function symlink::remove_symlink_auto [−][src]
pub fn remove_symlink_auto<P: AsRef<Path>>(path: P) -> Result<()>
Remove a symlink (non-preferred way).
This inspects the path metadata to remove the symlink as a file or directory, whichever is necessary.
A note on using this function
Because this is slightly less efficient on Windows, you should prefer to use
remove_symlink_file
or
remove_symlink_dir
instead. Only use this if you don’t know or
care whether the destination is a file or a directory (but even then, you do need to know that
it exists).
Errors
An error will be returned if the symlink cannot be removed.