org.ehoffman.test.aspects.FileSystemAccessor Maven / Gradle / Ivy
package org.ehoffman.test.aspects;
import java.io.File;
/**
* Used to access semi-temporary test folder.
* @author rex
*/
public final class FileSystemAccessor {
private static final ThreadLocal THREADLOCAL_FILE = new ThreadLocal<>();
private FileSystemAccessor() {
}
static void setFile(final File file) {
THREADLOCAL_FILE.set(file);
}
public static File getTestDir() {
return THREADLOCAL_FILE.get();
}
}