This function checks the status of the previously queued disinfection of infected files.
Note:
You must run the APIs in this order:
ClamScanner::start_scan
to start the virus scan.ClamScanner::get_scan_status
in a loop until the scan is finished.ClamScanner::list_infected_files
to get a report of the complete list of infected files.ClamScanner::disinfect_files
to queue the disinfection of the files.ClamScanner::check_disinfection_status
in a loop until you get a done status.If you want to display the progress, you can render the ClamScanner::check_disinfection_status
returned 'result{data}{details}' array where the type
is step
.
Each step
record indicates the action taken on a specific file in the set being processed.
uapi --output=jsonpretty \ --user=username \ ClamScanner \ check_disinfection_status
{- "apiversion": 3,
- "func": "check_disinfection_status",
- "module": "ClamScanner",
- "result": {
- "data": {
- "details": [
- {
- "file": "/home/user/virus",
- "id": 2,
- "message": "string",
- "state": "deleted",
- "type": "step"
}
], - "log": "/home/user/.clamavconnector.disinfection.log",
- "status": "done"
}, - "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}