Why file.mkdir is returning false?
Google indicates that there could be several reasons (e.g. security, permissions, pathname, etc).
My questions:
Here's something specific to Windows: In my case, the file.mkdir() method was failing with NoSuchFileException because I was trying to create a nested directory structure directly (e.g. results\results_ddMMyyyy without first creating the results directory) on Windows.
However, the exact same code worked fine on my Mac, i.e. no such exception was thrown on Mac and the intermediate results directory was created implicitly by the file.mkdir() method.
Hope this helps someone in future.