use std::path::PathBuf;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum SoftPathError {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Home directory not found")]
HomeDirNotFound,
#[error("Invalid path: {0}")]
InvalidPath(String),
#[error("Path depth exceeds maximum of {0} components")]
PathTooDeep(usize),
#[error("Path contains directory traversal attempt: {0}")]
PathTraversal(String),
#[error("Symlink cycle detected in path: {0:?}")]
SymlinkCycle(PathBuf),
#[error("Path depth exceeded: {0} components")]
PathDepthExceeded(usize),
#[error("Symlink depth exceeds maximum of {0} levels")]
SymlinkDepthExceeded(usize),
#[error("Symlink cycle detected in path: {0}")]
SymlinkCycleDetected(String),
#[error("Permission denied: {0}")]
PermissionDenied(String),
}