docs: def isdir(self, path=None, client_kwargs=None, virtual_dir=True,
                assume_exists=None):
          """
          Return True if path is an existing directory.
  
          Args:
              path (str): Path or URL.
              client_kwargs (dict): Client arguments.
              virtual_dir (bool): If True, checks if directory exists virtually
                  if an object path if not exists as a specific object.
              assume_exists (bool or None): This value define the value to return
                  in the case there is no enough permission to determinate the
                  existing status of the file. If set to None, the permission
                  exception is reraised (Default behavior). if set to True or
                  False, return this value.
  
          Returns:
              bool: True if directory exists.
          """
          relative = self.relpath(path)
          if not relative:
              # Root always exists and is a directory
              return True
  
          if path[-1] == '/' or self.is_locator(relative, relative=True):
              exists = self.exists(path=path, client_kwargs=client_kwargs,
                                   assume_exists=assume_exists)
              if exists:
                  return True
  
              # Some directories only exists virtually in object path and don't
              # have headers.
              elif virtual_dir:
                  try:
                      next(self.list_objects(relative, relative=True,
                                             max_request_entries=1))
                      return True
                  except (StopIteration, ObjectNotFoundError,
                          UnsupportedOperation):
                      return False
          return False