(file_path)
| 18 | |
| 19 | |
| 20 | def deletion_date(file_path): |
| 21 | path = pathlib.Path(file_path) |
| 22 | |
| 23 | while not path.exists(): |
| 24 | path = pathlib.Path(path.parent) |
| 25 | |
| 26 | if is_root(str(path)): |
| 27 | raise Exception("Couldn't find parent folder for the deleted file " + file_path) |
| 28 | |
| 29 | return modification_date(str(path)) |
| 30 | |
| 31 | |
| 32 | def is_root(path): |
nothing calls this directly
no test coverage detected