Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get absolute path to a file create by openFileOutput method in Android

Tags:

android

can you tell me what the full path of my xml file, which is created through the following method:

fileos = openFileOutput("new.xml", MODE_PRIVATE);

Thank you for your help.

like image 666
Sanat Pandey Avatar asked Mar 03 '11 14:03

Sanat Pandey


1 Answers

Even better, Android will tell you that by itself. :-) Use the following code:

getFileStreamPath("new.xml");

The SDK says:

Returns the absolute path on the filesystem where a file created with openFileOutput(String, int) is stored.

like image 83
Erez A. Korn Avatar answered Oct 15 '22 12:10

Erez A. Korn