¡@

Home 

2014/10/16 ¤W¤È 08:20:37

android Programming Glossary: numdays

Android Webview - Completely Clear the Cache

http://stackoverflow.com/questions/2465432/android-webview-completely-clear-the-cache

loop. I rewrote it to be truly recursive and added a numDays parameter so you can control how old the files must be that.. files static int clearCacheFolder final File dir final int numDays int deletedFiles 0 if dir null dir.isDirectory try for File.. if child.isDirectory deletedFiles clearCacheFolder child numDays then delete the files and subdirectories in this dir only..

Android Webview - Completely Clear the Cache

http://stackoverflow.com/questions/2465432/android-webview-completely-clear-the-cache

cannot be deleted the code will keep retrying in an infinite loop. I rewrote it to be truly recursive and added a numDays parameter so you can control how old the files must be that are pruned helper method for clearCache recursive returns number.. method for clearCache recursive returns number of deleted files static int clearCacheFolder final File dir final int numDays int deletedFiles 0 if dir null dir.isDirectory try for File child dir.listFiles first delete subdirectories recursively.. dir.listFiles first delete subdirectories recursively if child.isDirectory deletedFiles clearCacheFolder child numDays then delete the files and subdirectories in this dir only empty directories can be deleted so subdirs have been done..