1

One part of my app needs to write a data file out. I use getFilesDir() and it gives me a path like this (after adding a file name):

 /data/data/com.casadelgato.zillaconfigdroid/files/Log.1378357559316.csv

I create a PrintWriter to the file, write a bunch of stuff to it, and close it. No errors.

The problem is that I can't find the file anywhere on my Android device.

John Dvorak
  • 25,877
  • 12
  • 67
  • 81
CasaDelGato
  • 445
  • 5
  • 15
  • you will root permission i guess. if its on emulator you can use file explorer and check – Raghunandan Sep 05 '13 at 05:13
  • you can't access that dir on real devices.have a look at this question : `http://stackoverflow.com/questions/13006315/how-to-access-data-data-folder-in-android-device` – Mehul Joisar Sep 05 '13 at 05:19

1 Answers1

0

mention the file name in the path

FileOutputStream fos = context.openFileOutput(path,
                    Context.MODE_PRIVATE);

write the file into the stream...and you get the file by passing the same file name

FileInputStream openFileInput = context.openFileInput(path);

read the input stream

Jagadesh Seeram
  • 3,019
  • 1
  • 14
  • 29