package ru.forbion.f7cloud.feature.files

object OfficeFiles {
    private val EXTENSIONS = setOf(
        "doc", "docx", "dot", "dotx",
        "xls", "xlsx", "xlsm", "xlt", "xltx",
        "ppt", "pptx", "pot", "potx",
        "odt", "ods", "odp", "odg",
        "csv", "rtf",
    )

    fun isOfficeFile(name: String): Boolean {
        val ext = name.substringAfterLast('.', "").lowercase()
        return ext in EXTENSIONS
    }
}
