Reputation: 172
I'm programming an app, which needs to store data in a textfile.
I'm using FileOutputStream:
outputStream = openFileOutput(filename, Context.MODE_PRIVATE);
outputStream.write(data.getBytes());
outputStream.close();
My question is: Where is the file saved?
I can't find it anywhere...
For debugging, I'm using a nexus7.
Upvotes: 2
Views: 790
Reputation: 2737
writes to a file in your internal directory /data/data/pacakage/files
Upvotes: 0
Reputation: 11254
It's stored under /data/data/<your app>
by default. But unless you have rooted device, you have no access to this folder from device. But you can take a look on your file by using DDMS
from the Android SDK
(at the android-sdk\tools
folder)
Upvotes: 2
Reputation: 1451
/data/data/your.app.package.name/files
, but note this can be device dependent.. you can find it in eclipse by typing DDMS and then go to file explorer and then follow the above path
Upvotes: 0
Reputation: 552
If You are using Context.MODE_PRIVATE it is stored in application data directory and you do not have access to them from file manager
Upvotes: 0