I am running into a bug when i'm trying to create a directory, the problem is that DOCROOT at localhost contains 'C:' which is considered as a directory and then mkdir tries to create the folder inside 'C:' which throws an exception 'mkdir(): Invalid argument' at core/classes/file.php : line 216.
one other thing that I couldn't find in the core FILE class is a function to check whether a directory exists or not so I had to change the function exists and add another condition like so:
return is_file($path) ? true : is_dir($path);
now the function exists will return true if a file has been found or a directory and false if not.
But as in my case I had to deal with folders more than files, if there is any good idea it will be helpful, thanks. also in the first place the create_dir() function didn't work until made changes above.