Everything is in the question. Here is my code :
private void createDirectory(File currentDirectory) { File f = null; try { f = new File(current
instead of boolean success = f.mkdir(); use
boolean success = f.mkdir();
boolean success = f.mkdirs();
that solved my problem (i used the same reference code as you and had the same issue).