Class: LittleneckClamAV::Clamd
- Inherits:
-
Clam
- Object
- Clam
- LittleneckClamAV::Clamd
show all
- Defined in:
- lib/littleneck_clamav/clamd.rb
Instance Method Summary
collapse
Methods inherited from Clam
#available?, #database_date, #database_version, #engine
Instance Method Details
#command ⇒ Object
7
8
9
|
# File 'lib/littleneck_clamav/clamd.rb', line 7
def command
'clamdscan'
end
|
#scan(path) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/littleneck_clamav/clamd.rb', line 11
def scan(path)
check_scan! path
opts = { swallow_stderr: true, expected_outcodes: [0, 1] }
params = %(--no-summary -<"#{path}")
output = Cocaine::CommandLine.new(command, params, opts).run
parse_result path, output, $CHILD_STATUS.exitstatus
end
|