@Test public void test() { File file = ComposeUtils.applicationPath("tmp", "testCluster", "testApp", "testFile", true); String format = MessageFormat.format("{0}/compose/clusters/{1}/apps/{2}/{3}", "tmp", "testCluster", "testApp", "testFile"); assertEquals(format, file.toString()); }
public static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists) { fileName = fileName == null ? "docker-compose.yml" : fileName; Path path = Paths.get(root, "compose", "clusters", cluster, "apps", app, fileName); return createFile(path, deleteIfExists); }
ComposeUtils { public static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists) { fileName = fileName == null ? "docker-compose.yml" : fileName; Path path = Paths.get(root, "compose", "clusters", cluster, "apps", app, fileName); return createFile(path, deleteIfExists); } }
ComposeUtils { public static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists) { fileName = fileName == null ? "docker-compose.yml" : fileName; Path path = Paths.get(root, "compose", "clusters", cluster, "apps", app, fileName); return createFile(path, deleteIfExists); }  }
ComposeUtils { public static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists) { fileName = fileName == null ? "docker-compose.yml" : fileName; Path path = Paths.get(root, "compose", "clusters", cluster, "apps", app, fileName); return createFile(path, deleteIfExists); }  static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists); static File clusterPath(String root, String cluster, String fileName); }
ComposeUtils { public static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists) { fileName = fileName == null ? "docker-compose.yml" : fileName; Path path = Paths.get(root, "compose", "clusters", cluster, "apps", app, fileName); return createFile(path, deleteIfExists); }  static File applicationPath(String root, String cluster, String app, String fileName, boolean deleteIfExists); static File clusterPath(String root, String cluster, String fileName);  }