from __future__ import annotations

from pathlib import Path


class MoveFileOperation:
    def __init__(self, payload: dict[str, str]):
        self.src = payload["src"]
        self.dst = payload["dst"]

    def undo(self) -> None:
        Path(self.dst).rename(self.src)
