Class ResourceHelper


  • public class ResourceHelper
    extends Object
    Utility that provide classPath scan to retrieve resources
    • Method Detail

      • getFileResourcesByExtension

        public static Collection<File> getFileResourcesByExtension​(String extension)
        Scan into classpath folders to find resources with the required extension
        Parameters:
        extension - to find
        Returns:
        stream of matching resources
      • getResourcesByExtension

        public static Collection<String> getResourcesByExtension​(String extension)
        Scan into classpath folders to find resources with the required extension
        Parameters:
        extension - to find
        Returns:
        stream of matching resources
      • getFileResourcesFromDirectory

        public static Collection<File> getFileResourcesFromDirectory​(File directory,
                                                                     Pattern pattern)
        Scan folder to find resources that match with pattern
        Parameters:
        directory - where to start the search
        pattern - to find
        Returns:
        stream of matching resources
      • getResourcesFromDirectory

        public static Collection<String> getResourcesFromDirectory​(File directory,
                                                                   Pattern pattern)
        Scan folder to find resources that match with pattern
        Parameters:
        directory - where to start the search
        pattern - to find
        Returns:
        stream of matching resources