9

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.

1 Answer 1

37

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.