30 lines
748 B
Python
30 lines
748 B
Python
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
|