use of alien4cloud.exception.GitException in project alien4cloud by alien4cloud.
the class CsarFinderService method prepare.
/**
* Search in the given path for folders that contains CloudServiceArchives and zip them so they.
*
* @param searchPath The path in which to search for archives.
* @return a list of path that contains archives.
*/
public Set<Path> prepare(Path searchPath, Path zipPath) {
ToscaFinderWalker toscaFinderWalker = new ToscaFinderWalker();
toscaFinderWalker.zipRootPath = zipPath;
toscaFinderWalker.rootPath = searchPath;
try {
Files.walkFileTree(searchPath, toscaFinderWalker);
} catch (IOException e) {
throw new GitException("Failed to browse git repository content in order to import archives.", e);
}
return toscaFinderWalker.toscaArchives;
}
Aggregations