mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 23:45:05 +02:00
Implement output directory
This commit is contained in:
parent
fde811ae5a
commit
bbfdadc463
4 changed files with 381 additions and 12 deletions
|
|
@ -34,14 +34,14 @@ class Report:
|
|||
well as the set of changes made to local files.
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
self.known_files: Set[PurePath] = set()
|
||||
|
||||
self.new_files: Set[PurePath] = set()
|
||||
self.changed_files: Set[PurePath] = set()
|
||||
self.deleted_files: Set[PurePath] = set()
|
||||
|
||||
def mark(self, path: PurePath):
|
||||
def mark(self, path: PurePath) -> None:
|
||||
"""
|
||||
Mark a previously unknown file as known.
|
||||
|
||||
|
|
@ -58,21 +58,24 @@ class Report:
|
|||
|
||||
self.known_files.add(path)
|
||||
|
||||
def add_file(self, path: PurePath):
|
||||
def marked(self, path: PurePath) -> bool:
|
||||
return path in self.known_files
|
||||
|
||||
def add_file(self, path: PurePath) -> None:
|
||||
"""
|
||||
Unlike mark(), this function accepts any paths.
|
||||
"""
|
||||
|
||||
self.new_files.add(path)
|
||||
|
||||
def change_file(self, path: PurePath):
|
||||
def change_file(self, path: PurePath) -> None:
|
||||
"""
|
||||
Unlike mark(), this function accepts any paths.
|
||||
"""
|
||||
|
||||
self.changed_files.add(path)
|
||||
|
||||
def delete_file(self, path: PurePath):
|
||||
def delete_file(self, path: PurePath) -> None:
|
||||
"""
|
||||
Unlike mark(), this function accepts any paths.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue