OutputStream
FileOutputStream

OutputStream
FileterOutputStream
PrintStream(OutputStream out)//包转节点流
流啊流 根目录建文件
textView = findViewById(R.id.text_id);
File file = new File("/storage/emulated/0/babb.txt");//在目录下创建文件需要完整路径
try {
// FileInputStream fileInputStream = this.openFileInput(“aaa”);
// file.getParentFile().mkdirs();
file.createNewFile();
// FileOutputStream fileOutputStream = this.openFileOutput(“bbb.txt”, MODE_PRIVATE);
textView.setText(file.getPath());
} catch (Exception e) {
Log.e(“tag”, “文件未找到”);
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-02
  • 2022-12-23
  • 2021-05-28
  • 2021-12-02
  • 2021-11-19
  • 2021-05-19
猜你喜欢
  • 2021-12-09
  • 2022-03-09
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2021-11-24
  • 2022-12-23
相关资源
相似解决方案