i’m prepping for Q changes. is something like this an antipattern?
Copy code
inline val Context.storageRoot: File
get() = this.getExternalFilesDir(null) ?: run {
val storageRoot = File(this.filesDir, "storage")
storageRoot.mkdirs()
storageRoot
}
a
arekolek
05/16/2019, 6:22 AM
If it’s about android Q, then indeed this doesn’t fit this channel. If it is about how you implemented it in Kotlin, you might want to try #codereview instead.
m
matt tighe
05/16/2019, 5:14 PM
Oh my bad, I thought this channel was for discussing the usage of Kotlin on Android.