dolibarr  19.0.0-dev
Public Member Functions | List of all members
AntiVir Class Reference

Class to scan for virus. More...

Public Member Functions

 __construct ($db)
 Constructor. More...
 
 dol_avscan_file ($file)
 Scan a file with antivirus. More...
 
 getCliCommand ($file)
 Get full Command Line to run. More...
 

Detailed Description

Class to scan for virus.

Definition at line 30 of file antivir.class.php.

Constructor & Destructor Documentation

◆ __construct()

AntiVir::__construct (   $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 57 of file antivir.class.php.

Member Function Documentation

◆ dol_avscan_file()

AntiVir::dol_avscan_file (   $file)

Scan a file with antivirus.

This function runs the command defined in setup. This antivirus command must return 0 if OK. Return also true (virus found) if file end with '.virus' (so we can make test safely).

Parameters
string$fileFile to scan
Returns
int <0 if KO (-98 if error, -99 if virus), 0 if OK

Definition at line 71 of file antivir.class.php.

◆ getCliCommand()

AntiVir::getCliCommand (   $file)

Get full Command Line to run.

Parameters
string$fileFile to scan
Returns
string Full command line to run

Definition at line 131 of file antivir.class.php.


The documentation for this class was generated from the following file: