Back to project page AndroidFileBroadcast.
The source code is released under:
Apache License
If you think the Android project AndroidFileBroadcast listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.common.methods; /*w ww .j a v a 2 s. c om*/ import android.util.Log; import java.io.File; public class ClearCache { // Function to delete cache Files private static void deleteCacheFiles(String sDir) { File[] faFiles = new File(sDir).listFiles(); for (File file : faFiles) { if (file.getName().endsWith(".cache")) { file.delete(); Log.d("FTDebug", file.getAbsolutePath() + "deleted!"); } } } public static void clean(){ Log.d("FTDebug", "Cleanup Started!"); deleteCacheFiles(ExternalStorage.getsdcardfolderwithoutcheck()+'/'); Log.d("FTDebug", "Cleanup Ended!"); } }