1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.testUtil;
15
16
17 import java.io.File;
18
19
20
21
22 public class FileTestUtil {
23
24 public static void makeTestOutputDir() {
25 File target = new File(CoreTestConstants.TARGET_DIR);
26 if (target.exists() && target.isDirectory()) {
27 File testoutput = new File(CoreTestConstants.OUTPUT_DIR_PREFIX);
28 if (!testoutput.exists()) {
29 boolean result = testoutput.mkdir();
30 if(!result)
31 throw new IllegalStateException("Failed to create "+testoutput);
32 }
33 } else {
34 throw new IllegalStateException(CoreTestConstants.TARGET_DIR + " does not exist");
35 }
36 }
37 }