require_relative 'single_evidence'
require_relative 'filesystem_evidence'

module RCS
  module FilecapProcessing
    extend SingleEvidence
  include FilesystemEvidenceMixin

    def duplicate_criteria
      {"type" => :file,
       "data.type" => :capture,
       "data.path"=> self[:data][:path],
       "data.md5"=> self[:data][:md5]}
    end

    def type
      :file
    end

    def process
      update_filesystem_evidence or create_filesystem_evidence
    end
  end
end
