def METHOD_NAME(self, data: Union[str, bytes, S], url: Optional[List[str]] = None) -> None:
    self._assert_not_in_zipped_file()
    self._assert_url_end(url)
    if isinstance(data, str) and self.context.resolver.resolve(data):
        self.get_link_path().write_text(data)
        if self.config.path.exists():
            self.config.path.unlink()
        return None
    self.dump(cast(S, data), url)
    if self.get_link_path().exists():
        self.get_link_path().unlink()
    return None