@Override
  public Path copyFromClasspath(String resourcePath, String targetName, Class<?> contextClass) throws IOException {
    URL resource = contextClass.getResource(resourcePath);
    if (resource == null) {
      throw new IOException("Could not find resource: " + resourcePath);
    }
    return copyResource(resource, file(targetName));
  }
Basically the same as {@link DirectoryFixture#dir(String, Closure)}, but with the current root as base.
spock-core/src/main/java/spock/util/io/FileSystemFixture.java