Java tutorial
//package com.java2s; import android.text.TextUtils; import java.io.File; public class Main { private static void deleteFlie(String path) { if (TextUtils.isEmpty(path)) { return; } File filePath = new File(path); File[] itemList = filePath.listFiles(); long totalSize = 0; if (null != itemList) { for (File f : itemList) { if (f.exists() && f.isFile()) { f.delete(); } } } } }