def METHOD_NAME(self, pathfmt):
    archive = self.archive
    if archive and archive.check(pathfmt.kwdict):
        return
    directory = self._directory(pathfmt)
    path = directory + self._filename(pathfmt)
    if self.skip and os.path.exists(path):
        return
    try:
        with open(path, self.omode, encoding=self.encoding) as fp:
            self.write(fp, pathfmt.kwdict)
    except FileNotFoundError:
        os.makedirs(directory, exist_ok=True)
        with open(path, self.omode, encoding=self.encoding) as fp:
            self.write(fp, pathfmt.kwdict)
    if archive:
        archive.add(pathfmt.kwdict)
    if self.mtime:
        mtime = pathfmt.kwdict.get("_mtime")
        if mtime:
            util.set_mtime(path, mtime)