Package org.ametys.runtime.servlet
Class AnalyseFileForVirusHelper
java.lang.Object
org.ametys.runtime.servlet.AnalyseFileForVirusHelper
Helper that analyzes a file for viruses
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IntegerThe result of the antivirus when no viruses is found -
Method Summary
Modifier and TypeMethodDescriptionstatic booleananalysefile(String absolutePath) Antivirus analysis.static booleank 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:
trueif the antivirus is enabled,falseotherwise
-
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
-