title: android 6 - open failed: ENOENT (No such file or directory)
body: <p>When creating a new file, I am getting the above error. This code works in Android 4.4 version . I am testing on a 6.0.1 device and getting this error. I have the write permission in the manifest file, tried to mkDirs() before creating the file, still the same issue. Here is the code snippet :</p>
  
  <pre><code>File newFile = new File(localFilePath);
          try {
              String abc = null;
              abc = Environment.getExternalStorageState();
              if(!newFile.exists()) {
                  newFile.mkdirs();
                  newFile.createNewFile();
              }
          } catch (IOException e1) {
              e1.printStackTrace();
              return false;
          }
  </code></pre>
  
  <p>The externalStoragState comes back as 'mounted'. Storage location is /storage/emulated/0/testlocation/filename..</p>