nostra13/Android-Universal-Image-Loader — pull request #113 by niqo01 (2012-11-30 06:10:45+00:00)
Title: Add getCachedFileOnDiscIfExist for some flexibility

I have added the method getCachedFileOnDiscIfExist() in ImageLoader.
This provide a way to test if an url has been cached, and offer a direct link to the file.

This is useful in my case because I have a background thread that shows Android notifications with a big picture only If the picture is already in cache or a resource drawable otherwise.

Below how I am using this method
```java
final File file = ImageLoader.getInstance().getCachedFileOnDiscIfExist(url);
if (!file.exists()) {
return null;
}
final Resources res = mContext.getResources();
final int idealIconHeight =
res.getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
final int idealIconWidth =
res.getDimensionPixelSize(android.R.dimen.notification_large_icon_width);

return Utility.decodeSampledBitmapFromFile(file.getPath(), idealIconWidth,
idealIconHeight);