System.out.println("Loading " + className);\r
Path path = Paths.get(root, className + ".java");\r
Class<?> result = null;\r
- if (!path.toFile().exists())\r
+ if (!Files.exists(path))\r
return result;\r
List<String> lines = Files.readAllLines(path);\r
\r
public void test92() throws Exception {\r
\r
Path p = Paths.get(Paths.get("/Temp/xxx/").toString(), "test1.json");\r
- System.out.println(p.toFile().exists());\r
+ System.out.println(Files.exists(p));\r
\r
System.out.println(Files.isSymbolicLink(p));\r
\r
Path p1 = Paths.get("/Temp/xxx/test2.json");\r
- System.out.println(p1.toFile().exists());\r
+ System.out.println(Files.exists(p1));\r
System.out.println(Files.isSymbolicLink(p1));\r
}\r
\r
public void test9997() throws Exception {\r
Path sut = Paths.get("/opt/test.mxf");\r
Path catched = Paths.get("/opt/.STATUS/test.mxf.catched");\r
- assertFalse(catched.toFile().exists());\r
+ assertFalse(Files.exists(catched));\r
assertFalse(EscortFiles.isMediaCatched(sut));\r
\r
EscortFiles.createMediaCatch(sut);\r
\r
- assertTrue(catched.toFile().exists());\r
+ assertTrue(Files.exists(catched));\r
assertTrue(EscortFiles.isMediaCatched(sut));\r
\r
EscortFiles.removeMediaCatch(sut);\r
- assertFalse(catched.toFile().exists());\r
+ assertFalse(Files.exists(catched));\r
assertFalse(EscortFiles.isMediaCatched(sut));\r
}\r
\r
\r
@Test\r
public void test99992() throws Exception {\r
- System.out.println(Paths.get("/opt/exists").toFile().exists());\r
+ System.out.println(Files.exists(Paths.get("/opt/exists")));\r
int i = 1;\r
- System.out.println(Paths.get("/opt/exists").toFile().exists());\r
+ System.out.println(Files.exists(Paths.get("/opt/exists")));\r
}\r
\r
@Test\r