This commit is contained in:
mike
2025-12-13 11:56:06 +01:00
commit 2b2c575385
57 changed files with 6505 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
from typing import Iterator, Protocol, Any
from pathlib import Path
from dataclasses import dataclass
@dataclass
class FileMeta:
path: Path
size: int
modified_time: float
created_time: float
@dataclass
class MountInfo:
device: str
mount_point: str
fs_type: str
options: str
@dataclass
class DiskInfo:
device: str
model: str
size: int
serial: str
class IFileScanner(Protocol):
def scan(self, root: Path) -> Iterator[FileMeta]:
...
class ISystemAPI(Protocol):
def query_mounts(self) -> list[MountInfo]:
...
def query_nvmes(self) -> list[DiskInfo]:
...