1 package ch.qos.logback.core.property;
2
3 import ch.qos.logback.core.PropertyDefinerBase;
4 import java.io.File;
5
6
7
8
9 public class FileExistsPropertyDefiner extends PropertyDefinerBase {
10
11 String path;
12
13 public String getPath() {
14 return path;
15 }
16
17 public void setPath(String path) {
18 this.path = path;
19 }
20
21 public String getPropertyValue() {
22 if(path == null)
23 return "false";
24 File file = new File(path);
25 System.out.println(file.getAbsolutePath());
26 if(file.exists())
27 return "true";
28 else
29 return "false";
30 }
31 }