All Downloads are FREE. Search and download functionalities are using the official Maven repository.

no.difi.oxalis.test.filesystem.FakeHomeDetector Maven / Gradle / Ivy

package no.difi.oxalis.test.filesystem;

import no.difi.oxalis.api.filesystem.HomeDetector;
import org.kohsuke.MetaInfServices;

import java.io.File;
import java.nio.file.Paths;

/**
 * @author erlend
 */
@MetaInfServices
public class FakeHomeDetector implements HomeDetector {

    @Override
    public File detect() {
        try {
            return Paths.get(getClass().getResource("/oxalis_home/fake-oxalis.conf").toURI()).getParent().toFile();
        } catch (Exception e) {
            throw new IllegalStateException(e.getMessage(), e);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy