ru.pocketbyte.locolaser.mobile.resource.file.provider.AndroidResourceFileProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resource-mobile Show documentation
Show all versions of resource-mobile Show documentation
Implementation of platform for LocoLaser tool to work with Android and iOS platforms.
package ru.pocketbyte.locolaser.mobile.resource.file.provider
import ru.pocketbyte.locolaser.config.resources.ResourceFileProvider
import ru.pocketbyte.locolaser.resource.Resources
import java.io.File
internal object AndroidResourceFileProvider : ResourceFileProvider {
override fun get(locale: String, directory: File, name: String, extension: String): File {
val localeDir = StringBuilder("values")
if (Resources.BASE_LOCALE != locale) {
localeDir.append("-").append(locale)
}
return File(File(directory, localeDir.toString()), "$name.$extension")
}
}