I'm aware of the PHP file_exists
function, & is_dir
.
I saw about a month ago, a process where you can test BOTH in one search. But I can't find it now.
$file = "/directory/dir2/dir3/filename";
Is there a command based on the filename only - to test if the DIRECTORY exists? (without using 2-3 lines of code)
If the directory does not exist - mkdir
(recursive). But if the directory does exist, there's no need to use MKDIR
.
I can't find it in the mkdir information
Ps: I do know the mkdir recursive function.