use crate::error::PathmanError;
use std::path::Path;
#[cfg(unix)]
mod unix;
#[cfg(windows)]
pub(crate) mod windows;
#[cfg(unix)]
pub use unix::UnixPathUpdater as PlatformPathUpdater;
#[cfg(windows)]
pub use windows::WindowsPathUpdater as PlatformPathUpdater;
pub trait PathUpdater {
fn prepend<P: AsRef<Path>>(path: P, comment: Option<&str>) -> Result<UpdateType, PathmanError>;
fn append<P: AsRef<Path>>(path: P, comment: Option<&str>) -> Result<UpdateType, PathmanError>;
}
#[derive(Debug, PartialEq, Eq)]
pub enum UpdateType {
Success,
AlreadyInPath,
}