(src: &Path, dest: &Path)
| 414 | /// Unix has a dedicated definition; everything else falls back below. |
| 415 | #[cfg(unix)] |
| 416 | fn recreate_symlink(src: &Path, dest: &Path) -> std::io::Result<()> { |
| 417 | let link_target = std::fs::read_link(src)?; |
| 418 | std::os::unix::fs::symlink(link_target, dest) |
| 419 | } |
| 420 | |
| 421 | /// Non-Unix fallback: symlink creation needs special privileges, so copy the |
| 422 | /// file the link resolves to (correct content-wise). |
no outgoing calls
no test coverage detected