code: def build_url (self):
          
          self.build_base_url()
          if self.parent_url is not None:
              # URL joining with the parent URL only works if the query
              # of the base URL are removed first.
              # Otherwise the join function thinks the query is part of
              # the file name.
              from .urlbase import url_norm
              # norm base url - can raise UnicodeError from url.idna_encode()
              base_url, is_idn = url_norm(self.base_url, self.encoding)
              urlparts = list(urlparse.urlsplit(base_url))
              # ignore query part for filesystem urls
              urlparts[3] = ''
              self.base_url = urlutil.urlunsplit(urlparts)
          super(FileUrl, self).build_url()
          # ignore query and fragment url parts for filesystem urls
          self.urlparts[3] = self.urlparts[4] = ''
          if self.is_directory() and not self.urlparts[2].endswith('/'):
              self.add_warning(_("Added trailing slash to directory."),
                             tag=WARN_FILE_MISSING_SLASH)
              self.urlparts[2] += '/'
          self.url = urlutil.urlunsplit(self.urlparts)
docs: Calls super.build_url() and adds a trailing slash to directories.