zut.files.archivate
- zut.files.archivate(path: str | Path, archive_dir: bool | str | Path | None = None, *, missing_ok: bool = False, keep: bool = False) str
Archivate path to archive_dir directory, ensuring unique archive name. - archive_dir: By default (if None), use the same directory as the origin path. If relative, it is relative to the directory of the original path. - missing_ok: If True, do not throw an exception if the original file does not exist. - keep: If True, the original file is not removed after archiving.