Commit 58d479f8 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added fr.is_good() to check existence of alleged files

parent 873890aa
...@@ -97,3 +97,7 @@ class FileRecorder(list): ...@@ -97,3 +97,7 @@ class FileRecorder(list):
return f"{len(self)} alleged, " \ return f"{len(self)} alleged, " \
f"{len(self) - sum(self.to_table()['existence'])} missing, " \ f"{len(self) - sum(self.to_table()['existence'])} missing, " \
f"{sum(self.to_table()['existence'])} to db" f"{sum(self.to_table()['existence'])} to db"
def is_good(self):
""" Check if all alleged files exist. """
return all(self.to_table()['existence'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment