Here you can find the source of toFile(List
public static List<File> toFile(List<String> filenames)
//package com.java2s; //License from project: Eclipse Distribution License import java.io.File; import java.util.ArrayList; import java.util.List; public class Main { public static List<File> toFile(List<String> filenames) { List<File> files = new ArrayList<File>(); for (String filename : filenames) { files.add(new File(filename)); }// w w w .j ava 2 s. co m return files; } }