package com.bolan.android.modules;

import android.content.Context;
import android.os.Environment;

import java.io.File;

public class Utils {

    public static File getDiskCacheDir(Context context) {
        File cacheFile;
        if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || !Environment.isExternalStorageRemovable()) {
            cacheFile = context.getExternalCacheDir();
        } else {
            cacheFile = context.getCacheDir();
        }
        return cacheFile;
    }
}
