Is there any function to know if a directory exists?
file_exists(string) does it.
This is for people like me looking for an answer 🙂
Try the is_dir() function.