public JibContainerBuilder addLayer(List<Path> files, AbsoluteUnixPath pathInContainer)
      throws IOException {
    FileEntriesLayer.Builder layerConfigurationBuilder = FileEntriesLayer.builder();

    for (Path file : files) {
      layerConfigurationBuilder.addEntryRecursive(
          file, pathInContainer.resolve(file.getFileName()));
    }

    return addFileEntriesLayer(layerConfigurationBuilder.build());
  }
Adds a new layer to the container with {@code files} as the source files and {@code
pathInContainer} as the path to copy the source files to in the container file system.

<p>Source files that are directories will be recursively copied. For example, if the source
files are:

<ul>
  <li>{@code fileFoo}
  <li>{@code fileBar}
  <li>{@code directory/}
</ul>

<p>and the destination to copy to is {@code /path/in/container}, then the new layer will have
the following entries for the container file system:

<ul>
  <li>{@code /path/in/container/fileFoo}
  <li>{@code /path/in/container/fileBar}
  <li>{@code /path/in/container/directory/}
  <li>{@code /path/in/container/directory/...} (all contents of {@code directory/})
</ul>

@param files the source files to copy to a new layer in the container
@param pathInContainer the path in the container file system corresponding to the {@code
    sourceFile}
@return this
@throws IOException if an exception occurred when recursively listing any directories
jib-core/src/main/java/com/google/cloud/tools/jib/api/JibContainerBuilder.java