Clamex v0.2.0 Clamex.Scanner.Clamdscan behaviour View Source
Scanner implementation for clamdscan
command-line utility.
Link to this section Summary
Functions
Perform file scan
Callbacks
Perform file scan using clamdscan
command-line utility
Link to this section Functions
Perform file scan
Callback implementation for Clamex.Scanner.scan/1
.
Link to this section Callbacks
Perform file scan using clamdscan
command-line utility.
Examples
iex> Clamex.Scanner.Clamdscan.scan("test/files/virus.txt")
{:error, :virus_found}
iex> Clamex.Scanner.Clamdscan.scan("test/files/safe.txt")
:ok
Error reasons
:virus_found
- file is infected:cannot_access_file
- file specified aspath
cannot be accessed:scanner_not_available
- scanner is not available atexecutable_path
:cannot_connect_to_clamd
- ClamAV daemon is not running in background- any other error reported by the scanner will be returned as is (as String)