Where are files created using FileOutputStream on Android?

后端 未结 3 1596
太阳男子
太阳男子 2021-01-23 04:27

I\'ve created a file in my code, as shown below

 FileOutputStream fOut = openFileOutput(\"samplefile.txt\", MODE_WORLD_READABLE);
 OutputStreamWriter osw = new O         


        
3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-23 05:16

    The file is being saved to internal storage (see this link).

    You can retrieve the path of the file with getFilesDir() (see this link).

    The path is /data/data/yourapplicationpackagename/files.

提交回复
热议问题