Class ResourceLoader

java.lang.Object
org.gradle.util.ResourceLoader

public final class ResourceLoader extends Object
Static util class containing methods for extracting resource directories from the classpath.
  • Constructor Details

    • ResourceLoader

      public ResourceLoader()
  • Method Details

    • extractDirectoryFromResources

      public void extractDirectoryFromResources(String relativePath, File destDir) throws IOException
      Recursively copies the contents of a directory from the classpath (or a jar file on the classpath) to a specified directory.
      Parameters:
      relativePath - relative path to the source directory (or relative path within a jar file to the directory)
      destDir - target directory to extract the contents to
      Throws:
      IOException - if an I/O error occurs