title: Android, Bluestacks: "open failed: EISDIR (Is a directory)"
body: <p>I'm getting <code>open failed: EISDIR (Is a directory)</code>. All the solutions I've found from that say to call <code>file.getParentFile().mkdirs()</code>, but I'm still getting that error. It prints out <code>Good</code> but also prints out <code>Directory not created</code>.</p>
  
  <pre><code>    String state = Environment.getExternalStorageState();
      if (Environment.MEDIA_MOUNTED.equals(state))
      {
          Log.e("test", "Good");
      }
  
      File f = Environment.getExternalStorageDirectory();
      lvlWriter.writeLevel(f);
  </code></pre>
  
  <p>.</p>
  
  <pre><code>writeLevel(File f)
  {
          File file = new File(f, "1.txt");
  
          if (!file.getParentFile().mkdirs())
          {
              Log.e("test", "Directory not created");
          }
  
          if (!file.exists())
          {
              file.createNewFile();
          }
  </code></pre>