pub async fn scan_file_socket<P: AsRef<Path>>(
    file_path: P,
    socket_path: P,
    chunk_size: Option<usize>
) -> IoResult
Expand description

Scans a file for viruses using a Unix socket connection

This function reads data from a file located at the specified path and streams it to a ClamAV server through a Unix socket connection for scanning.

Arguments

  • file_path: Path to the file to be scanned
  • socket_path: Path to the Unix socket for the ClamAV server
  • chunk_size: An optional chunk size for reading data. If None, a default chunk size is used

Returns

An IoResult containing the server’s response as a vector of bytes