usestd::io::Error;pubusecrate::fs::impls::DirectoryHandler;/// File system handler trait to handle common file system operations.
pubtraitFileSystemHandler{/// Fetches the file content.
////// File location is not taken into consideration here. It is up to
/// the struct implementing this trait to take that decision.
////// # Arguments
////// * `file_name` - The name of the file to be fetched
////// # Returns
////// A result containing the fetched file content, or a
/// [`std::io::Error`] on error (e.g. file system failure, insufficient
/// privilege...).
fnfetch_content(&self, file_name:&str)->Result<String, Error>;/// List files.
////// File location is not taken into consideration here. It is up to
/// the struct implementing this trait to take that decision.
////// # Returns
////// A result containing the list of files, or a
/// [`std::io::Error`] on error (e.g. file system failure, insufficient
/// privilege...).
fnlist_files(&self)->Result<Vec<String>, Error>;}