class Files {

    public static final boolean removeFolder(final File folder) {
        if (folder == null) {
            return false;
        }

        if (folder.isDirectory()) {
            File[] files = folder.listFiles();
            if (files != null) {
                for (File file : files) {
                    if (file.isDirectory()) {
                        removeFolder(file);
                    } else {
                        remove(file);
                    }
                }
            }
        }

        // delete the empty folder
        return folder.delete();
    }

    private  Files();

}