getCachePath

public static String getCachePath(Context context)

获取缓存存储路径,如 /sdcard/Android/data/<package name>/cache

Return

目录的完整路径,外置存储未加载或出现其他错误时返回空字符串 ""

Parameters

context

传入的 Context


public static String getCachePath(Context context, String dir)

获取缓存存储路径,如 /sdcard/Android/data/<package name>/cache/<dir>

Return

目录的完整路径,外置存储未加载或出现其他错误时返回空字符串 ""

Parameters

context

传入的 Context

dir

自定义目录