(symlink_path: &Path, target: &Path)
| 14 | } |
| 15 | |
| 16 | pub fn create_symlink(symlink_path: &Path, target: &Path) -> crate::Result<()> { |
| 17 | if symlink_path.exists() { |
| 18 | log::debug!("Symlink {} exists, removing", symlink_path.display()); |
| 19 | std::fs::remove_file(symlink_path)?; |
| 20 | } |
| 21 | log::debug!("Creating new symlink: {}", symlink_path.display()); |
| 22 | std::os::unix::fs::symlink(target, symlink_path)?; |
| 23 | Ok(()) |
| 24 | } |
| 25 | |
| 26 | pub fn get_current_dir() -> PathBuf { |
| 27 | std::env::current_dir().expect("Cannot get current working directory") |