Here you can find the source of getDiskCacheDir(Context context, String uniqueName)
public static File getDiskCacheDir(Context context, String uniqueName)
//package com.java2s; import java.io.File; import android.content.Context; import android.os.Environment; public class Main { public static File getDiskCacheDir(Context context, String uniqueName) { final String cachePath = Environment.MEDIA_MOUNTED .equals(Environment.getExternalStorageState()) ? getExternalCacheDir( context).getPath()// ww w . ja v a 2 s . co m : context.getCacheDir().getPath(); return new File(cachePath + File.separator + uniqueName); } public static File getExternalCacheDir(Context context) { final String cacheDir = "/Android/data/" + context.getPackageName() + "/cache/"; return new File(Environment.getExternalStorageDirectory().getPath() + cacheDir); } }