Testat 3b und experimentelle sichere Ausführung für Testat 3a
This commit is contained in:
@@ -1,30 +1,17 @@
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Path;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class InMemoryPathFactory {
|
||||
|
||||
private static InMemoryFileSystem fileSystem;
|
||||
private static final InMemoryFileSystemProvider provider = new InMemoryFileSystemProvider();
|
||||
private static final InMemoryFileSystem fileSystem = new InMemoryFileSystem(provider);
|
||||
|
||||
private InMemoryPathFactory() {
|
||||
// Utility class - private constructor
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
// Create the in-memory file system
|
||||
URI uri = URI.create("memory://default/");
|
||||
Map<String, Object> env = new HashMap<>();
|
||||
fileSystem = (InMemoryFileSystem) FileSystems.newFileSystem(uri, env);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("Failed to create in-memory file system", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new in-memory path
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user