Clamex v0.2.2 Clamex View Source
Clamex is a thin wrapper for ClamAV.
Link to this section Summary
Link to this section Functions
Specs
Check if file is safe
Examples
iex> Clamex.safe?("virus.txt")
false
iex> Clamex.safe?("safe.txt")
true Specs
Perform file scan
Examples
iex> Clamex.scan("virus.txt")
{:error, :virus_found}
iex> Clamex.scan("safe.txt")
:okError reasons
:virus_found- file is infected:cannot_access_file- file specified aspathcannot 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)
Specs
Check if file is infected
Examples
iex> Clamex.virus?("virus.txt")
true
iex> Clamex.virus?("safe.txt")
false