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