fast_fs/error.rs
1// <FILE>crates/fast-fs/src/error.rs</FILE> - <DESC>Error types</DESC>
2// <VERS>VERSION: 0.2.0 - 2025-12-07T16:58:06Z</VERS>
3// <WCTX>Moved to root for visibility</WCTX>
4// <CLOG>Unchanged content</CLOG>
5
6//! Error types for fast-fs
7use std::path::PathBuf;
8use thiserror::Error;
9/// Error type for fast-fs operations
10#[derive(Error, Debug)]
11pub enum Error {
12 /// An I/O error occurred during a file system operation
13 #[error("I/O error: {0}")]
14 Io(#[from] std::io::Error),
15
16 /// The specified path does not exist
17 #[error("Path not found: {0}")]
18 NotFound(PathBuf),
19
20 /// The path exists but is not a directory (when a directory was expected)
21 #[error("Not a directory: {0}")]
22 NotDirectory(PathBuf),
23}
24
25// <FILE>crates/fast-fs/src/error.rs</FILE> - <DESC>Error types</DESC>
26// <VERS>END OF VERSION: 0.2.0 - 2025-12-07T16:58:06Z</VERS>