com.nostra13.universalimageloader.utils
Class StorageUtils

java.lang.Object
  extended by com.nostra13.universalimageloader.utils.StorageUtils

public final class StorageUtils
extends Object

Provides application storage paths

Since:
1.0.0
Author:
Sergey Tarasevich (nostra13[at]gmail[dot]com)

Method Summary
static File getCacheDirectory(android.content.Context context)
          Returns application cache directory.
static File getIndividualCacheDirectory(android.content.Context context)
          Returns individual application cache directory (for only image caching from ImageLoader).
static File getOwnCacheDirectory(android.content.Context context, String cacheDir)
          Returns specified application cache directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getCacheDirectory

public static File getCacheDirectory(android.content.Context context)
Returns application cache directory. Cache directory will be created on SD card ("/Android/data/[app_package_name]/cache") if card is mounted and app has appropriate permission. Else - Android defines cache directory on device's file system.

Parameters:
context - Application context
Returns:
Cache directory

getIndividualCacheDirectory

public static File getIndividualCacheDirectory(android.content.Context context)
Returns individual application cache directory (for only image caching from ImageLoader). Cache directory will be created on SD card ("/Android/data/[app_package_name]/cache/uil-images") if card is mounted and app has appropriate permission. Else - Android defines cache directory on device's file system.

Parameters:
context - Application context
Returns:
Cache directory

getOwnCacheDirectory

public static File getOwnCacheDirectory(android.content.Context context,
                                        String cacheDir)
Returns specified application cache directory. Cache directory will be created on SD card by defined path if card is mounted and app has appropriate permission. Else - Android defines cache directory on device's file system.

Parameters:
context - Application context
cacheDir - Cache directory path (e.g.: "AppCacheDir", "AppDir/cache/images")
Returns:
Cache directory


Copyright © 2011-2013. All Rights Reserved.