LibreTube/app/src/main/java/com/github/libretube/util/DownloadHelper.kt

25 lines
527 B
Kotlin
Raw Normal View History

2022-09-10 15:21:50 +05:30
package com.github.libretube.util
import android.content.Context
import java.io.File
object DownloadHelper {
private fun getOfflineStorageDir(context: Context): File {
return context.getExternalFilesDir(null)!!
}
fun getVideoDir(context: Context): File {
return File(
getOfflineStorageDir(context),
"video"
)
}
fun getAudioDir(context: Context): File {
return File(
getOfflineStorageDir(context),
"audio"
)
}
}