code: def _append_slash_if_dir_path(self, relpath):
      
      if self._isdir_raw(relpath):
        return self._append_trailing_slash(relpath)
  
      return relpath
docs: For a dir path return a path that has a trailing slash.