All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.automatiko.engine.quarkus.deployment.PackageWalker Maven / Gradle / Ivy

There is a newer version: 0.39.0
Show newest version
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