pub async fn scan_directory(
dir_path: &str,
convert: bool,
verbose: bool,
types: Option<Vec<String>>,
) -> Result<()>Expand description
Scans a directory for non-UTF-8 encoded files and optionally converts them to UTF-8
§Arguments
dir_path- The directory path to scanconvert- Whether to automatically convert files to UTF-8verbose- Whether to show detailed encoding informationtypes- Optional list of file extensions to process. If None, uses default list.
§Returns
Returns Ok(()) if the operation was successful, or an error if something went wrong
§Example
use file_kitty::encoding::scan_directory;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
scan_directory("./my_project", false, false, None).await?;
Ok(())
}