From 973951fe36062a8250b6890213b1e0c3e71da8b2 Mon Sep 17 00:00:00 2001 From: ulrich Date: Wed, 13 Nov 2024 15:11:00 +0000 Subject: [PATCH] Dokumentation in Arbeit, Konstanten verschoben --- src/de/uhilger/fm/Eraser.java | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/de/uhilger/fm/Eraser.java b/src/de/uhilger/fm/Eraser.java index 9378b12..d42f12f 100644 --- a/src/de/uhilger/fm/Eraser.java +++ b/src/de/uhilger/fm/Eraser.java @@ -30,6 +30,9 @@ * @author Ulrich Hilger, 15. Januar 2024 */ public class Eraser { + + public static final int OP_DELETE = 3; + public String deleteFiles(String relPath, List<String> fileNames, String base) { String result = null; try { @@ -42,7 +45,7 @@ //logger.fine(targetFile.getAbsolutePath()); if (targetFile.isDirectory()) { CopyMoveVisitor bearbeiter = new CopyMoveVisitor(); - bearbeiter.setOperation(Const.OP_DELETE); + bearbeiter.setOperation(OP_DELETE); Files.walkFileTree(targetFile.toPath(), bearbeiter); } else { /* @@ -51,9 +54,9 @@ die so heissen, also z.B. alle [Dateiname]*.jpg */ String fname = targetFile.getName().toLowerCase(); - if (fname.endsWith(Const.JPEG) - || fname.endsWith(Const.JPG) - || fname.endsWith(Const.PNG)) { + if (fname.endsWith(ImageFileFilter.JPEG) + || fname.endsWith(ImageFileFilter.JPG) + || fname.endsWith(ImageFileFilter.PNG)) { deleteImgFiles(targetDir, targetFile); } else { targetFile.delete(); -- Gitblit v1.9.3