标签:android
public static final String TEMP_PHOTO_FILE_NAME = "temp_photo.jpg";
private static String mSdRootPath = Environment.getExternalStorageDirectory().getPath(); /** * 删除SD卡或者手机的缓存图片和目录 */ public void deleteFile() { Log.i("INFO", mSdRootPath+"/"+TEMP_PHOTO_FILE_NAME+"========================"); File dirFile = new File(mSdRootPath+"/"+TEMP_PHOTO_FILE_NAME); if(! dirFile.exists()){ return; } if (dirFile.isDirectory()) { String[] children = dirFile.list(); for (int i = 0; i < children.length; i++) { new File(dirFile, children[i]).delete(); } } dirFile.delete(); }
android 删除SD卡或者手机的缓存图片和目录,布布扣,bubuko.com
标签:android
原文地址:http://blog.csdn.net/u014608640/article/details/32705147