Package org.ametys.runtime.servlet
Class AnalyseFileForVirusHelper
java.lang.Object
org.ametys.runtime.servlet.AnalyseFileForVirusHelper
Helper that analyzes a file for viruses
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Integer
The result of the antivirus when no viruses is found -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
analysefile
(String absolutePath) Antivirus analysis.static boolean
k Checks if the antivirus is enabled
-
Field Details
-
ANTIVIRUS_RESULT_OK
The result of the antivirus when no viruses is found
-
-
Method Details
-
isAntivirusEnabled
k Checks if the antivirus is enabled- Returns:
true
if the antivirus is enabled,false
otherwise
-
analysefile
Antivirus analysis. Based on clamscan results.- Parameters:
absolutePath
- the absolute path of the file to analyse- Returns:
- true if the file is correct, false if a malware was discovered in the file
-