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 | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/de/uhilger/fm/Eraser.java b/src/de/uhilger/fm/Eraser.java index 0ecea3d..d42f12f 100644 --- a/src/de/uhilger/fm/Eraser.java +++ b/src/de/uhilger/fm/Eraser.java @@ -1,5 +1,5 @@ /* - neon-fm - File management extensions to Neon + fm - File management class library Copyright (C) 2024 Ulrich Hilger This program is free software: you can redistribute it and/or modify @@ -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 { @@ -41,8 +44,8 @@ File targetFile = new File(targetDir, fileName); //logger.fine(targetFile.getAbsolutePath()); if (targetFile.isDirectory()) { - OrdnerBearbeiter bearbeiter = new OrdnerBearbeiter(); - bearbeiter.setOperation(Const.OP_DELETE); + CopyMoveVisitor bearbeiter = new CopyMoveVisitor(); + 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