Class ResourceList

java.lang.Object
net.thucydides.core.resources.ResourceList

public class ResourceList
extends java.lang.Object
Utility class to read report resources from the classpath. This way, report resources such as images and stylesheets can be shipped in a separate JAR file.
  • Constructor Summary

    Constructors 
    Modifier Constructor Description
    protected ResourceList​(java.lang.String resourceDirectory, java.util.regex.Pattern pattern)  
  • Method Summary

    Modifier and Type Method Description
    static ResourceList forResources​(java.lang.String resourceDirectory, java.util.regex.Pattern pattern)  
    java.util.Collection<java.lang.String> list()
    Find a list of resources matching a given path on the classpath.
    protected java.util.zip.ZipFile zipFileFor​(java.io.File file)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ResourceList

      protected ResourceList​(java.lang.String resourceDirectory, java.util.regex.Pattern pattern)
  • Method Details

    • forResources

      public static ResourceList forResources​(java.lang.String resourceDirectory, java.util.regex.Pattern pattern)
    • list

      public java.util.Collection<java.lang.String> list()
      Find a list of resources matching a given path on the classpath. for all elements of java.class.path get a Collection of resources Pattern pattern = Pattern.compile(".*"); gets all resources
      Returns:
      the resources in the order they are found
    • zipFileFor

      protected java.util.zip.ZipFile zipFileFor​(java.io.File file) throws java.io.IOException
      Throws:
      java.io.IOException