Added files to PathClassification
This commit is contained in:
parent
4fa7b60ddc
commit
cf9474a1fe
1 changed files with 9 additions and 0 deletions
|
@ -59,3 +59,12 @@ class PathClassification:
|
||||||
|
|
||||||
category: PathCategory = PathCategory.UNCLASSIFIED
|
category: PathCategory = PathCategory.UNCLASSIFIED
|
||||||
"""Category of path media."""
|
"""Category of path media."""
|
||||||
|
|
||||||
|
files: list[FileClassification] = []
|
||||||
|
"""List of all files in the path."""
|
||||||
|
|
||||||
|
def get_files_by_category(
|
||||||
|
self, category: FileCategory
|
||||||
|
) -> filter[FileClassification]:
|
||||||
|
"""Get all files of a specific category."""
|
||||||
|
return filter(lambda f: f.category == category, self.files)
|
||||||
|
|
Loading…
Reference in a new issue