@Fun @Name(name = "localRepo") @Help(shortDesc = "create local repo") public LocalUplaunchRepo localRepo( @Name(name = "path") @Help(shortDesc = "location of repo") String path) { if (path == null) return null; File froot = FileSystems.get(path); File dir = froot; if (dir != null && !dir.isExists()) { dir.mkdirs(); } LocalUplaunchRepo luprepo = new LocalUplaunchRepo(); luprepo.setRoot(froot); return luprepo; }
// TODO doc it @Fun(operator = true) @Name(name = "config") public RepoConfig getConfig(LocalUplaunchRepo repo) { if (repo == null) throw new IllegalArgumentException("repo==null"); RepoConfig rc = repo.getConfig(); if (rc != null) { configRepoMap.put(rc, repo); } return rc; }