pub async fn scan_file<P: AsRef<Path>, T: TransportProtocol>(
file_path: P,
connection: T,
chunk_size: Option<usize>,
) -> IoResultExpand description
Scans a file for viruses
This function reads data from a file located at the specified file_path
and streams it to a ClamAV server for scanning.
§Arguments
file_path: The path to the file to be scannedconnection: The connection type to use - either TCP or a Unix socket connectionchunk_size: An optional chunk size for reading data. IfNone, a default chunk size is used
§Returns
An IoResult containing the server’s response as a vector of bytes