Skip to content

Commit

Permalink
Merge pull request #680 from IkeVoodoo/master
Browse files Browse the repository at this point in the history
Attempting to speed up file scanning
  • Loading branch information
OpticFusion1 authored Aug 25, 2023
2 parents 1eb14d3 + 17ee69b commit f6873ec
Show file tree
Hide file tree
Showing 4 changed files with 453 additions and 393 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package optic_fusion1.antimalware.scanner;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

import static optic_fusion1.antimalware.AntiMalware.LOGGER;

public final class ScanHelper {

private ScanHelper() {

}

public static boolean isFileEmpty(Path path) {
try {
return Files.size(path) == 0;
} catch (IOException e) {
LOGGER.exception(e);
return false;
}
}

}
Loading

0 comments on commit f6873ec

Please sign in to comment.