// Path: src/main/java/de/idrinth/waraddonclient/service/logger/BaseLogger.java
// public abstract class BaseLogger {
//     protected static final String LEVEL_INFO = "INFO";
// 
//     protected static final String LEVEL_ERROR = "ERROR";
// 
//     protected static final String LEVEL_WARNING = "WARN";
// 
//     protected abstract void log(String message, String severity);
// 
//     public void info(Throwable message) {
//         info(message.getLocalizedMessage());
//     }
// 
//     public void info(String message) {
//         log(message, LEVEL_INFO);
//     }
// 
//     public void warn(Throwable message) {
//         warn(message.getLocalizedMessage());
//     }
// 
//     public void warn(String message) {
//         log(message, LEVEL_WARNING);
//     }
// 
//     public void error(Throwable message) {
//         error(message.getLocalizedMessage());
//     }
// 
//     public void error(String message) {
//         log(message, LEVEL_ERROR);
//     }
// }


import de.idrinth.waraddonclient.service.logger.BaseLogger;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Objects;

package de.idrinth.waraddonclient;


public class Utils {

    private Utils() {
    }

    public static void emptyFolder(File folder) throws IOException {
        if (folder == null || !folder.exists()) {
            return;
        }
        for (File file : Objects.requireNonNull(folder.listFiles())) {
            if (file.isDirectory()) {
                emptyFolder(file);
            }
            Files.deleteIfExists(file.toPath());
        }
    }

    public static void deleteFolder(File folder) throws IOException {
        if (folder == null || !folder.exists()) {
            return;
        }
        emptyFolder(folder);
        Files.deleteIfExists(folder.toPath());
    }

// Path: src/main/java/de/idrinth/waraddonclient/service/logger/BaseLogger.java
// public abstract class BaseLogger {
//     protected static final String LEVEL_INFO = "INFO";
// 
//     protected static final String LEVEL_ERROR = "ERROR";
// 
//     protected static final String LEVEL_WARNING = "WARN";
// 
//     protected abstract void log(String message, String severity);
// 
//     public void info(Throwable message) {
//         info(message.getLocalizedMessage());
//     }
// 
//     public void info(String message) {
//         log(message, LEVEL_INFO);
//     }
// 
//     public void warn(Throwable message) {
//         warn(message.getLocalizedMessage());
//     }
// 
//     public void warn(String message) {
//         log(message, LEVEL_WARNING);
//     }
// 
//     public void error(Throwable message) {
//         error(message.getLocalizedMessage());
//     }
// 
//     public void error(String message) {
//         log(message, LEVEL_ERROR);
//     }
// }


// Path: src/main/java/de/idrinth/waraddonclient/Utils.java
import de.idrinth.waraddonclient.service.logger.BaseLogger;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Objects;

package de.idrinth.waraddonclient;


public class Utils {

    private Utils() {
    }

    public static void emptyFolder(File folder) throws IOException {
        if (folder == null || !folder.exists()) {
            return;
        }
        for (File file : Objects.requireNonNull(folder.listFiles())) {
            if (file.isDirectory()) {
                emptyFolder(file);
            }
            Files.deleteIfExists(file.toPath());
        }
    }

    public static void deleteFolder(File folder) throws IOException {
        if (folder == null || !folder.exists()) {
            return;
        }
        emptyFolder(folder);
        Files.deleteIfExists(folder.toPath());
    }

    public static void sleep(int duration, BaseLogger logger) {
