(path: &Path)
| 930 | } |
| 931 | |
| 932 | fn remove_path(path: &Path) -> Result<(), SplitSnapshotError> { |
| 933 | let Ok(metadata) = std::fs::symlink_metadata(path) else { |
| 934 | return Ok(()); |
| 935 | }; |
| 936 | if metadata.file_type().is_dir() && !metadata.file_type().is_symlink() { |
| 937 | std::fs::remove_dir_all(path).map_err(RepositoryError::Io)?; |
| 938 | } else { |
| 939 | std::fs::remove_file(path).map_err(RepositoryError::Io)?; |
| 940 | } |
| 941 | Ok(()) |
| 942 | } |
| 943 | |
| 944 | #[cfg(unix)] |
| 945 | fn create_symlink(path: &Path, bytes: &[u8]) -> Result<(), SplitSnapshotError> { |
no test coverage detected