is_dir()
The is_dir() function checks if a given path is a directory. This is useful for validating directory paths.