def is_dir(self, follow_symlinks=True):
        """
        Return True if this entry is a directory or a symbolic link pointing to
        a directory; return False if the entry is or points to any other kind
        of file, or if it doesn’t exist anymore.

        The result is cached on the os.DirEntry object.

        Args:
            follow_symlinks (bool): Follow symlinks.
                Not supported on cloud storage objects.

        Returns:
            bool: True if directory exists.
        """
        try:
            return (self._system.isdir(
                path=self._path, client_kwargs=self._client_kwargs,
                virtual_dir=False) or

                # Some directories only exists virtually in object path and
                # don't have headers.
                bool(S_ISDIR(self.stat().st_mode)))

        except ObjectPermissionError:
            # The directory was listed, but unable to head it or access to its
            # content
            return True