from abc import ABC, abstractmethod from pathlib import Path from typing import Callable class OverlayMounter(ABC): @abstractmethod def mount( self, *, lowerdirs: str, upperdir: Path, workdir: Path, merged: Path, on_stdout: Callable[[str], None] | None = None, on_stderr: Callable[[str], None] | None = None, passthrough: bool = False, ) -> None: raise NotImplementedError @abstractmethod def unmount( self, *, merged: Path, on_stdout: Callable[[str], None] | None = None, on_stderr: Callable[[str], None] | None = None, passthrough: bool = False, ) -> None: raise NotImplementedError