use std::path::PathBuf;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum FileSystemError {
#[error("gameinfo.txt not found in {0}")]
GameInfoNotFound(PathBuf),
#[error("invalid game path (missing parent or file name): {0}")]
InvalidGamePath(PathBuf),
#[error("failed to parse gameinfo.txt")]
GameInfoParseError,
#[cfg(feature = "steam")]
#[error("steamlocate error: {0}")]
SteamLocateError(#[from] steamlocate::Error),
#[cfg(feature = "steam")]
#[error("steam app {0} not found")]
SteamAppNotFound(u32),
#[cfg(feature = "steam")]
#[error("steam installation not found")]
SteamNotFound,
}