title: File.mkdirs() doesn't work all the time
body: <p>I am trying to create a directory using <code>File.mkdirs()</code>. However, it seems to behave strange: sometimes it creates the directory, but other times, <strong>it silently ignores</strong> the creation of directory. </p>
  
  <p>Earlier I was useing mkdir() but in one of the articles, I read that using mkdirs() would solve the issue. However, it seems not. Any help?</p>
  
  <p>This code is running on a windows machine. </p>
  
  <p><strong>CODE:</strong></p>
  
  <pre><code>File myDir = new File(dirPath);
  
  try{
        myDir.mkdirs();
     } 
     catch(Exception e) {
          e.printStackTrace();
     }
  </code></pre>