Here you can find the source of deleteEmptyFiles(String p)
public static void deleteEmptyFiles(String p)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static void deleteEmptyFiles(String p) { File path = new File(p); File[] files = path.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].length() == 0) { files[i].delete();/*w ww . jav a 2 s. co m*/ } } } }