io.automatiko.engine.quarkus.deployment.PackageWalker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of automatiko-common-deployment Show documentation
Show all versions of automatiko-common-deployment Show documentation
Common Deployment module for Quarkus Extension for Automatiko Engine
package io.automatiko.engine.quarkus.deployment;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class PackageWalker {
public static List getAllSiblings(Collection filesToCompile) {
return filesToCompile.stream().map(f -> f.getParentFile().toPath()).distinct().flatMap(PackageWalker::walk)
.map(Path::toFile).collect(Collectors.toList());
}
private static Stream walk(Path path) {
try {
return Files.walk(path);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy