Compare commits

...

2 Commits

Author SHA1 Message Date
63f6f99caa don't create new log 2025-07-12 13:14:44 +01:00
8889f24166 obtain directory name from path 2025-07-12 13:14:11 +01:00
2 changed files with 10 additions and 6 deletions

View File

@ -11,6 +11,10 @@ class Directory(ABC):
self.contents = self.populate(log)
@property
def name(self):
return self.path.name
@abstractmethod
def populate(self, log: Log) -> list:
raise NotImplementedError

View File

@ -1,14 +1,14 @@
from abc import ABC, abstractmethod
from dir import Root
from log import Log, LogCat
from pathlib import Path
class Layer(ABC):
def __init__(self, log_path: Path, log_category: str):
self.log_path = log_path
self.__log = Log(log_path)
self.log = LogCat(self.__log.queue, log_category)
def __init__(self, log: Log, log_category: str):
self.log = LogCat(log.queue, log_category)
def process(self, root: Root):
self._process(root)
@abstractmethod
def __process(self, root: Root):
def _process(self, root: Root):
raise NotImplementedError