Implement delete instruction

This commit is contained in:
Jakob Moser 2025-05-21 14:39:27 +02:00
parent bd8b0415d4
commit 1a0a600fc7
Signed by: jakob
GPG Key ID: 3EF2BA2851B3F53C

View File

@ -1,11 +1,15 @@
from dataclasses import dataclass from dataclasses import dataclass
from pathlib import Path
from karaokatalog.deduplicate.instructions.Instruction import Instruction from karaokatalog.deduplicate.instructions.Instruction import Instruction
@dataclass(frozen=True) @dataclass(frozen=True)
class DeleteInstruction(Instruction): class DeleteInstruction(Instruction):
# TODO Add file to delete """
Deletes the given path (might point to a file, a folder or a link), no questions asked.
"""
path_to_delete: Path
def __call__(self) -> None: def __call__(self) -> None:
pass # TODO Implement self.path_to_delete.unlink()