📅  最后修改于: 2022-03-11 14:53:33.341000             🧑  作者: Mango
val file:String = fileName.text.toString()
val data:String = fileData.text.toString()
val fileOutputStream:FileOutputStream
try {
fileOutputStream = openFileOutput(file, Context.MODE_PRIVATE)
fileOutputStream.write(data.toByteArray())
}catch (e: Exception){
e.printStackTrace()
}