mkdir() is not creating the new directory

You have to use mkdirs() with an s if you want to create multiple directories. It is probably also worth checking that you canWrite() to the location as some places are permissioned. Both of these are on the File class


its obj.mkdirs()

have a look to this:

File  f = new File("non_existing_dir/someDir");
System.out.println(f.mkdir());
System.out.println(f.mkdirs());

The first print won't create a directory and returns false but the second does and returns true