Return True if the path is a directory, or a symbolic link pointing to a directory; return False if the path is (or points to) any other kind of file, or if it doesn’t exist.
Return True if the path is a file, or a symbolic link pointing to a file; return False if the path is (or points to) a directory or other non-file, or if it doesn’t exist.