Writing a zip to internal storage -- file doesn't exist after download completion
<p>I used <a href="http://www.hassanpur.com/blog/2011/04/android-development-downloading-a-file-from-the-web/" rel="nofollow">a tutorial</a> to download a zip into a subdirectory of my application's internal storage. I wrote the zip to <code>/data/data/my.package.name/files/mySubDirectory/the.zip</code>.</p>

<p>But, when I check to see whether the zip exists, it doesn't:</p>

<pre><code>    String fileDirectory = this.getFilesDir().getAbsolutePath() + "/mySubDirectory/the.zip";
    File file = new File(fileDirectory);
    if(file.exists()) {
        Log.e(this.class.getName(), "file exists");
    } else {
        Log.e(this.class.getName(), "file doesn't exist");
    }
</code></pre>

<p>I verified that <code>fileDirectory</code> is the same path as the <code>File outFile</code> for the <code>FileOutputStream</code>.</p>

<p>What could be the problem?                                                        </p>
