Here you can find the source of deleteBlankPath(String path)
public static int deleteBlankPath(String path)
//package com.java2s; //License from project: Apache License import java.io.File; public class Main { public static int deleteBlankPath(String path) { File f = new File(path); if (!f.canWrite()) { return 1; }/*from ww w . j ava 2s. c om*/ if (f.list() != null && f.list().length > 0) { return 2; } if (f.delete()) { return 0; } return 3; } }