use thiserror::Error;
pub type VfsResult<T> = Result<T, VfsError>;
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum VfsError {
#[error("not found: {0}")]
NotFound(String),
#[error("permission denied: {0}")]
PermissionDenied(String),
#[error("already exists: {0}")]
AlreadyExists(String),
#[error("not a directory: {0}")]
NotDirectory(String),
#[error("not a file: {0}")]
NotFile(String),
#[error("directory not empty: {0}")]
DirectoryNotEmpty(String),
#[error("invalid path: {0}")]
InvalidPath(String),
#[error("I/O error: {0}")]
Io(String),
#[error("storage error: {0}")]
Storage(String),
#[error("invalid seek: {0}")]
InvalidSeek(String),
#[error("resource busy: {0}")]
Busy(String),
}