public class StorageUtils extends Object
| 构造器和说明 |
|---|
StorageUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static File |
cachedDir(android.content.Context context)
Get cache file
|
static void |
cleanExternalCache(android.content.Context context)
Clean external cache(/mnt/sdcard/android/data/com.xxx.xxx/cache)
|
static void |
cleanInternalCache(android.content.Context context)
Clean internal cache(/data/data/com.xxx.xxx/cache) * *
|
static void |
deleteFolderFile(String filePath,
boolean deleteThisPath)
Delete file in a path
|
static long |
getFolderSize(File file)
Get floder size
|
static String |
getFormatSize(double size)
Format storage unit
|
public static File cachedDir(android.content.Context context)
context - contextpublic static void cleanInternalCache(android.content.Context context)
context - contextpublic static void cleanExternalCache(android.content.Context context)
context - contextpublic static long getFolderSize(File file) throws Exception
file - fileExceptionpublic static String getFormatSize(double size)
size - sizepublic static void deleteFolderFile(String filePath, boolean deleteThisPath)
deleteThisPath - delete pathfilePath - filePath