def METHOD_NAME(self, tgt_in, flags):
    src = rsurl.Url(self.url)  # deep copy
    tgt = rsurl.Url(tgt_in)  # deep copy
    if tgt.scheme != 'file':
        raise BadParameter("Only file://localhost URLs are supported as copy targets.")
    if tgt.host != 'localhost':
        raise BadParameter("Only file://localhost URLs are supported as copy targets.")
    #if rsumisc.url_is_relative (src) : src = rsumisc.url_make_absolute (cwdurl, src)
    #if rsumisc.url_is_relative (tgt) : tgt = rsumisc.url_make_absolute (cwdurl, tgt)
    target = ""
    src_filename = os.path.basename(src.path)
    local_path = tgt.path
    if os.path.exists(tgt.path):
        if os.path.isfile(tgt.path):
            # fail if overwtrite flag is not set, otherwise copy
            if flags & OVERWRITE:
                target = local_path
            else:
                raise BadParameter("Local file '%s' exists." % local_path)
        elif os.path.isdir(tgt.path):
            # add source filename to target path
            target = os.path.join(local_path, src_filename)
            if os.path.exists(target):
                if not flags & OVERWRITE:
                    raise BadParameter("Local file '%s' exists." % target)
    try:
        urllib.request.urlretrieve(str(src), target)
    except Exception as e:
        raise BadParameter("Couldn't copy %s to %s: %s" %
                                (str(src), target, str(e))) from e