My android application is saving some stats to internal storage. Each file name is in the format of “appname-currentDate”
I was wondering:
- When I save to internal storage, is there a specific folder assigned to my app, or are my files saved along with files from other applications in the same directory.
- Is there a way to know the list of files saved by my application to the internal storage
Thank you so much.
1) Depends on which method you use to get the file handle. Normally files are stored in an application specific directory, eg. /data/data/[your.package.name]/. The files in that directory are only readable by your application.
2) Use the getFilesDir() method in your Activity to get a File handle and use the listFiles() on it to get an array of File representing all files in your application data folder.
Further reading: http://developer.android.com/guide/topics/data/data-storage.html