You are here

function _clamav_get_version_via_exec in ClamAV 7

Same name and namespace in other branches
  1. 6 clamav.inc \_clamav_get_version_via_exec()

Get version information from a clamav executable.

Parameters

String $executable_path:

Return value

String

1 call to _clamav_get_version_via_exec()
clamav_get_version in ./clamav.inc
Get the version information for clamav.

File

./clamav.inc, line 371
clamav.inc API and helper functions for the ClamAV module.

Code

function _clamav_get_version_via_exec($executable_path) {
  if (is_file($executable_path)) {
    return exec(escapeshellcmd($executable_path) . ' -V');
  }
  else {
    return NULL;
  }
}