public ImmutableList<Path> walk(PathConsumer pathConsumer) throws IOException {
    ImmutableList<Path> files = walk();
    for (Path path : files) {
      pathConsumer.accept(path);
    }
    return files;
  }
Walks {@link #rootDir} and applies {@code pathConsumer} to each file. Note that {@link
#rootDir} itself is visited as well.

@param pathConsumer the consumer that is applied to each file.
@return a list of Paths that were walked.
@throws IOException if the walk fails.
jib-core/src/main/java/com/google/cloud/tools/jib/filesystem/DirectoryWalker.java