I have written a method for an Android application:
public void doMethod()throws IOException{
Log.d("STORAGE", Environment.getExternalStorageDirectory().toString());
File file = new File(context.getExternalFilesDir("NOTES")+"TEST.txt");
Log.d("FILE", file.createNewFile()+"");
FileOutputStream os = new FileOutputStream(file);
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));
bw.write("HELLO WORLD");
bw.close();
Log.d("WRITE", "DONE");
}
In spite of executing this code (calling this method from an activity), I cannot see the file TEST.txt
in my phone's file manager when I open the NOTES
directory.
The directory named NOTES
is being created without a problem. Where is my TEST.txt
file going to?