obtain directory name from path

This commit is contained in:
George Lacey 2025-07-12 13:14:11 +01:00
parent 641abcdd90
commit 8889f24166

View File

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