Accessing the file created in internal storage <p>I decided to save a file using internal storage into a folder. My code is:</p> <pre><code>File dir = new File (getFilesDir(), "myFolder"); dir.mkdirs(); File file = new File(dir, "myData.txt"); try { FileOutputStream f = new FileOutputStream(file); PrintWriter pw = new PrintWriter(f); pw.println("Hi"); pw.println("Hello"); pw.flush(); pw.close(); f.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } tv.append("\n\nFile written to "+file); </code></pre> <p>The directory shown is data/data/packageName/file/myFolder/myData.txt However, I wanted to check whether the file contains the strings inputted but i can't seem to find where the created file is. I tried to output the contents of the file but i failed. I know this sounds ridiculous. All i wanna do is to check the contents and also know whether a file is created or not. Can anybody please help?</p>