- // try (DirectoryStream<Path> ds =
- // Files.newDirectoryStream(basePath)) {
- // Path res = null;
- // for (Path path : ds) {
- // if (pm.matches(path)) {
- // if (res == null)
- // res = path;
- // else
- // throw new OsgiBootException(
- // "More than one file matching " + relativeUrl + " found in " +
- // baseUrl);
- // }
- // }
- // if (res == null)
- // throw new OsgiBootException("No file matching " + relativeUrl
- // + " found in " + baseUrl);
- // return res.toUri().toURL().toString();
- // // Iterator<Path> it = ds.iterator();
- // // if (!it.hasNext())
- // // throw new OsgiBootException("No file matching " +
- // // relativeUrl + " found in " + baseUrl);
- // // Path distributionBundlePath = it.next();
- // // if (it.hasNext())// TODO implement version ordered
- // // throw new OsgiBootException(
- // // "More than one file matching " + relativeUrl + " found in
- // // " + baseUrl);
- // // return distributionBundlePath.toUri().toURL().toString();
- // }