get_scheme_files

Function get_scheme_files 

Source
pub fn get_scheme_files(
    dirpath: impl AsRef<Path>,
    is_recursive: bool,
) -> Result<Vec<SchemeFile>>
Expand description

Recursively retrieves scheme file paths from a directory.

This function traverses the given directory recursively, gathering all valid scheme files. It skips hidden files and directories (those whose names start with a .).

§Arguments

  • dirpath - A reference to a Path representing the directory to start the search from.

§Returns

Returns a Result containing a Vec<SchemeFile> if successful, where SchemeFile represents a valid scheme file. If any error occurs during directory traversal or file handling, an Err with the relevant error information is returned.

§Errors

This function can return an error in the following scenarios:

  • If the directory cannot be read.
  • If there is an issue accessing the contents of the directory.
  • If there is an issue creating a SchemeFile from a file path.