#![cfg_attr(feature = "fail-on-warnings", deny(warnings))]
#![warn(clippy::all, clippy::pedantic, clippy::nursery, clippy::cargo)]
#![allow(clippy::multiple_crate_versions)]
use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum CopyError {
#[error("Failed to read directory {}: {io_error}", path.display())]
ReadDirError {
path: PathBuf,
io_error: std::io::Error,
},
#[error("Failed to create directory {}: {io_error}", path.display())]
CreateDirError {
path: PathBuf,
io_error: std::io::Error,
},
#[error("Failed to copy {} to {}: {io_error}", source_path.display(), target_path.display())]
FileCopyError {
source_path: PathBuf,
target_path: PathBuf,
io_error: std::io::Error,
},
#[error("Failed to read symlink {}: {io_error}", path.display())]
ReadLinkError {
path: PathBuf,
io_error: std::io::Error,
},
#[error("Failed to create symlink {}: {io_error}", path.display())]
CreateSymlinkError {
path: PathBuf,
io_error: std::io::Error,
},
#[error("Failed to get metadata for {}: {io_error}", path.display())]
MetadataError {
path: PathBuf,
io_error: std::io::Error,
},
#[error("Failed to enumerate directory {}: {message}", path.display())]
EnumerationError {
path: PathBuf,
message: String,
},
}