Ollie C Ollie C - 3 months ago 23
Android Question

What file system path is used by Android's Context.openFileOutput()?

I can't understand why the answer to this isn't in the Android developer docs; I find them consistently frustrating.

Re the openFileOutput() method on the Context class to open a file for writing, what internal storage file path does it write to?

http://developer.android.com/reference/android/content/Context.html

http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

Answer

Re the openFileOutput() method on the Context class to open a file for writing, what internal storage file path does it write to?

It points to where getFilesDir() on Context returns. You can tell this because the documentation says:

Returns the absolute path to the directory on the filesystem where files created with openFileOutput(String, int) are stored.