Here you can find the source of getFilesOf(File dir)
public static File[] getFilesOf(File dir) throws IllegalArgumentException
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static File[] getFilesOf(File dir) throws IllegalArgumentException { if (dir == null) { throw new IllegalArgumentException("argument must not be null."); }/* w w w .j ava 2s .co m*/ File[] files = dir.listFiles(); if (files == null) { throw new IllegalArgumentException("could not get files of [" + dir + "]"); } return files; } }