Add extensions for handling UniFile name/file extensions

This commit is contained in:
arkon
2023-11-26 15:56:43 -05:00
parent f365b53a0f
commit 46aeab9a7a
4 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,9 @@
package tachiyomi.core.storage
import com.hippo.unifile.UniFile
val UniFile.extension: String?
get() = name?.substringAfterLast('.')
val UniFile.nameWithoutExtension: String?
get() = name?.substringBeforeLast('.')