% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dawnn.R
\name{check_model_file}
\alias{check_model_file}
\title{Check a downloaded model against its expected size and checksum.}
\usage{
check_model_file(model_file_path, expected_size, expected_md5)
}
\arguments{
\item{model_file_path}{String path to the downloaded model.}

\item{expected_size}{Integer expected size of the model, in bytes.}

\item{expected_md5}{String expected MD5 checksum of the model.}
}
\value{
Invisibly, \code{TRUE} if the file matches, otherwise stop execution with
an error message.
}
\description{
\code{check_model_file()} stops if the file at \code{model_file_path} is
not the model expected at Dawnn's default URL. The offending file is deleted,
so that a corrupt model cannot later be loaded by \code{run_dawnn()}. The checksum
is only compared when the size matches, so a truncated download is reported
once rather than twice.
}
\keyword{internal}
