code: def head_directory(self, mdir):
          
          log.debug('HEAD ListDirectory %r', mdir)
          res, content = self._request(mdir, "HEAD")
          if res["status"] != "200":
              raise errors.MantaAPIError(res, content)
          return res
docs: HEAD method on ListDirectory
          https://apidocs.joyent.com/manta/api.html#ListDirectory
  
          This is not strictly a documented Manta API call. However it is
          provided to allow access to the useful 'result-set-size' header.
  
          @param mdir {str} A manta path, e.g. '/trent/stor/mydir'.
          @returns The response object, which acts as a dict with the headers.