// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/impl/FileSystemHelper.java
// public class FileSystemHelper {
// 
//     public static Path createTempDirectory() throws IOException {
//         return Files.createTempDirectory("test");
//     }
// 
//     public static void removeDirectory(Path directory) throws IOException {
//         Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {
//             @Override
//             public FileVisitResult visitFile(Path file, BasicFileAttributes attributes) throws IOException {
//                 Files.delete(file);
//                 return FileVisitResult.CONTINUE;
//             }
// 
//             @Override
//             public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException {
//                 Files.delete(dir);
//                 return FileVisitResult.CONTINUE;
//             }
//         });
//     }
// 
// }


import org.junit.rules.ExternalResource;
import org.meridor.stecker.impl.FileSystemHelper;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
package org.meridor.stecker;



public class TemporaryDirectory extends ExternalResource {

    private Path directory;

    @Override
    protected void before() throws Throwable {
        super.before();
        create();
    }

    private void create() throws IOException {
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/impl/FileSystemHelper.java
// public class FileSystemHelper {
// 
//     public static Path createTempDirectory() throws IOException {
//         return Files.createTempDirectory("test");
//     }
// 
//     public static void removeDirectory(Path directory) throws IOException {
//         Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {
//             @Override
//             public FileVisitResult visitFile(Path file, BasicFileAttributes attributes) throws IOException {
//                 Files.delete(file);
//                 return FileVisitResult.CONTINUE;
//             }
// 
//             @Override
//             public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException {
//                 Files.delete(dir);
//                 return FileVisitResult.CONTINUE;
//             }
//         });
//     }
// 
// }


// Path: stecker-plugin-loader/src/test/java/org/meridor/stecker/TemporaryDirectory.java
import org.junit.rules.ExternalResource;
import org.meridor.stecker.impl.FileSystemHelper;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

package org.meridor.stecker;



public class TemporaryDirectory extends ExternalResource {

    private Path directory;

    @Override
    protected void before() throws Throwable {
        super.before();
        create();
    }

    private void create() throws IOException {
        directory = FileSystemHelper.createTempDirectory();