opendir()
gives me a PHP warning if a folder cannot be accessed.
I can use is_dir but what if the folder gets deleted in the meantime:
if(is_dir($some_dir)){
// HERE, DELETED, GONE :(
$d = opendir($some_dir);
// warning !!0
}
that warning messes up my entire error handling code.
Is there any way to do file manipulation without getting warnings? FALSE results are enough to understand that the file is inaccessible, I don't understand why does it have to warn me too :(
Please dont tell me to use @. There has to be a better way