pub async fn scan_directory(
dir_path: &str,
auto_convert: bool,
verbose: bool,
) -> 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 scanauto_convert
- Whether to automatically convert files to UTF-8verbose
- Whether to show detailed encoding information
§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).await?;
Ok(())
}