Everything is in the question. Here is my code :
private void createDirectory(File currentDirectory) {
File f = null;
try {
f = new File(current
First, please use the File constructor that takes a File for your directory and a String for your desired subdirectory.
Beyond that, most likely you are attempting to create a directory where you are not allowed, either because:
currentDirectory does not exist, orcurrentDirectory points to a place on the on-board flash storage where you are not allowed to write, orcurrentDirectory points to a place on the external storage and you lack the WRITE_EXTERNAL_STORAGE permission