package com.common.commonlib.utils

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

/**
 * 基础工具类
 */
object BaseUtils {
    private const val TAG: String = "BaseUtils"

    fun <T> isListEmpty(list: List<T>?): Boolean {
        return list == null || list.isEmpty()
    }

    /**
     * 获取应用中文件存储
     */
    fun getExternalStoragePath(context: Context): String? {
        return context.getExternalFilesDir(null)?.path
    }

    fun getExternalStorageDirectory(context: Context): String? {
        return Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).path
    }
}