MCPcopy
hub / github.com/bugy/script-server / deletion_date

Function deletion_date

src/utils/file_utils.py:20–29  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

18
19
20def 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
32def is_root(path):

Callers

nothing calls this directly

Calls 2

is_rootFunction · 0.85
modification_dateFunction · 0.85

Tested by

no test coverage detected