1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 03:57:44 +00:00

Remove the is_symlink function

This commit is contained in:
Sylvestre Ledru 2022-07-06 11:18:31 +02:00 committed by GitHub
parent 334a0c13ba
commit 450bd3b597
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -983,16 +983,6 @@ fn adjust_canonicalization(p: &Path) -> Cow<Path> {
}
}
/// Decide whether the given path is a symbolic link.
fn is_symlink(path: &Path) -> bool {
// TODO Replace this convenience function with `Path::is_symlink()`
// when the minimum supported version of Rust is 1.58 or greater.
match fs::symlink_metadata(path) {
Err(_) => false,
Ok(m) => m.file_type().is_symlink(),
}
}
/// Read the contents of the directory `root` and recursively copy the
/// contents to `target`.
///