I want to create a directory if it does\'nt exist already.
Is using is_dir enough for that purpose?
is_dir
if ( !is_dir( $dir ) ) { mkdir(
A way to check if a path is directory can be following:
function isDirectory($path) { $all = @scandir($path); return $all !== false; }
NOTE: It will return false for non-existant path too, but works perfectly for UNIX/Windows