Here you can find the source of toPaths(Iterable
static Iterable<Path> toPaths(Iterable<File> files)
//package com.java2s; //License from project: Open Source License import com.google.common.base.Function; import com.google.common.collect.Iterables; import java.io.File; import java.nio.file.Path; public class Main { private static final Function<File, Path> toPath = new Function<File, Path>() { @Override//w w w .j a va 2s . c o m public Path apply(File file) { return file.toPath(); } }; static Iterable<Path> toPaths(Iterable<File> files) { return Iterables.transform(files, toPath); } }