created important file system methods in the target classs

This commit is contained in:
Hellow2 2023-03-30 14:59:53 +02:00
parent 6d3c36e075
commit fc98998cdb

View File

@ -44,3 +44,10 @@ class Target(DatabaseObject):
@property @property
def indexing_values(self) -> List[Tuple[str, object]]: def indexing_values(self) -> List[Tuple[str, object]]:
return [('filepath', self.file_path)] return [('filepath', self.file_path)]
@property
def exists(self) -> bool:
return self.file_path.exists
def create_path(self):
self._path.mkdir(parents=True, exist_ok=True)