pub fn reset_task_log_directory(path: &Path) -> Result<(), Error> {
    let task_log_dir = path.join("task_logs");

    let files = read_dir(task_log_dir)?;

    for file in files.flatten() {
        if let Err(err) = remove_file(file.path()) {
            error!("Failed to delete log file: {}", err);
        }
    }

    Ok(())
}
/// Remove all files in the log directory.
Remove all files in the log directory.
Remove all files in the log directory .
pub fn reset_task_log_directory(path: &Path) -> Result<(), Error> {
    let task_log_dir = path.join("task_logs");
    let files = read_dir(task_log_dir)?;
    for file in files.flatten() {
        if let Err(err) = remove_file(file.path()) {
            error!("Failed to delete log file: {}", err);
        }
    }
    Ok(())
}
pub fn reset_task_log_directory ( path : & Path ) -> Result < ( ) , Error > { let task_log_dir = path . join ( " " ) ; let files = read_dir ( task_log_dir ) ? ; for file in files . flatten ( ) { if let Err ( err ) = remove_file ( file . path ( ) ) { error ! ( " " err ) ; } } Ok ( ( ) ) }
Remove all files in the log directory.
Remove all files in the log directory .
path
&Path
path
&Path