Example #1
0
 public static File getFile(Context c, String url, String ext) {
   String filename = Utils.md5(url);
   if (filename.length() <= 0) return null;
   File tmpDirExt = new File(Cache.getDir(c) + "/" + ext);
   if (tmpDirExt.exists() == false) {
     tmpDirExt.mkdirs();
   }
   File file = new File(tmpDirExt.toString() + "/" + filename + "." + ext);
   return file;
 }
Example #2
0
 public Cache(Context c) {
   cacheDir = Cache.getDir(c);
   Debug.i("Cache Dir:" + cacheDir);
 }