Package org.kie.test.util.filesystem
Class ResourceHelper
- java.lang.Object
-
- org.kie.test.util.filesystem.ResourceHelper
-
public class ResourceHelper extends Object
Utility that provide classPath scan to retrieve resources
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Stream<File>getResourcesByExtension(String extension)Scan into classpath folders to find resources with the required extensionstatic Stream<File>getResourcesFromDirectory(File directory, Pattern pattern)Scan folder to find resources that match with pattern
-
-
-
Method Detail
-
getResourcesByExtension
public static Stream<File> getResourcesByExtension(String extension)
Scan into classpath folders to find resources with the required extension- Parameters:
extension- to find- Returns:
- stream of matching resources
-
getResourcesFromDirectory
public static Stream<File> getResourcesFromDirectory(File directory, Pattern pattern)
Scan folder to find resources that match with pattern- Parameters:
directory- where to start the searchpattern- to find- Returns:
- stream of matching resources
- Throws:
IOException
-
-