(path: &std::path::Path)
| 330 | /// writes for a symlink entry. |
| 331 | #[cfg(unix)] |
| 332 | fn link_target_bytes(path: &std::path::Path) -> std::io::Result<Vec<u8>> { |
| 333 | use std::os::unix::ffi::OsStrExt; |
| 334 | std::fs::read_link(path).map(|target| target.as_os_str().as_bytes().to_vec()) |
| 335 | } |
| 336 | |
| 337 | #[cfg(not(unix))] |
| 338 | fn link_target_bytes(path: &std::path::Path) -> std::io::Result<Vec<u8>> { |