Android mkdirs() returns false
<p>I am having an Android mkdirs() return false. I read another response you had to a similar question. You mentioned something about Environment.getExternal ... anyways I am running Android 2.2 on Droid X. The sd card is mounted and both return values for isreadable and iswritable return true. here is my code ...</p>

<pre><code>public void writeToExternalStoragePublic(String filename, byte[] content) {

    // API Level 7 or lower, use getExternalStorageDirectory() 
    //  to open a File that represents the root of the external 
    // storage, but writing to root is not recommended, and instead 
    // application should write to application-specific directory, as shown below.

    String packageName = this.getPackageName();
    Toast.makeText(this, packageName, 1000).show();
    String path = "/Android/data/";// + packageName + "/files/";

    if (isExternalStorageAvailable() &amp;&amp; 
       !isExternalStorageReadOnly()) {
        try {
            File file = new File(path, filename);
            file.mkdirs();
            file.mkd
            Toast.makeText(this, "Made Dirs = " + file.mkdirs(), 1000).show();
            Toast.makeText(this, "Made Dir = " + file.mkdir(), 1000).show();

            FileOutputStream fos = new FileOutputStream(file);
            fos.write(content);
            fos.close();
            Toast.makeText(this, "success", 1000).show();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            Toast.makeText(this, "fnf", 1000).show();
        } catch (IOException e) {
            e.printStackTrace();
            Toast.makeText(this, "io", 1000).show();
        } catch (SecurityException e) {
            Toast.makeText(this, "security", 1000).show();
        }
    }
}
</code></pre>

<p>Thank You. If you know any way I could get it to mkdirs I would appreciate it. Thank You.</p>

<p>This code was actually an example from someone else and I am trying to make it work.</p>

<p><a href="http://www.ibm.com/developerworks/xml/library/x-androidstorage/index.html" rel="nofollow">http://www.ibm.com/developerworks/xml/library/x-androidstorage/index.html</a></p>

<p>D-RAN</p>
