use std::io::{Error, ErrorKind::Other, Result};
-use std::path::PathBuf;
+use std::path::Path;
use std::process::{Command, Stdio};
use std::time::{SystemTime, UNIX_EPOCH};
true
}
- fn sync_up(&self, remote: &str, directory: &PathBuf) -> Result<()> {
+ fn sync_up(&self, remote: &str, directory: &Path) -> Result<()> {
let timestamp = SystemTime::now()
.duration_since(UNIX_EPOCH)
.map_err(|_| Error::new(Other, "Invalid time"))?
Ok(())
}
- fn sync_down(&self, remote: &str, directory: &PathBuf) -> Result<()> {
+ fn sync_down(&self, remote: &str, directory: &Path) -> Result<()> {
let commands = vec![
format!("cd {} && git init -b main", directory.display()),
format!("cd {} && git checkout .", directory.display()),