How would you complete the method call to verify if the external storage is available and writable prior to saving data?
fun writeToFile(context: Context, filename: String, data: String) {
if (_______________ == Environment.MEDIA_MOUNTED) {
val file = File(context.getExternalFilesDir(null), filename)
FileOutputStream(file).use {
it.write(data.toByteArray())
}
}
}