MCPcopy Index your code
hub / github.com/bugy/script-server / last_modification

Function last_modification

src/utils/file_utils.py:120–142  ·  view source on GitHub ↗
(folder_paths)

Source from the content-addressed store, hash-verified

118
119
120def last_modification(folder_paths):
121 result = None
122
123 for root_folder_path in folder_paths:
124 file_date = modification_date(root_folder_path)
125 if (result is None) or (result < file_date):
126 result = file_date
127
128 for root, subdirs, files in os.walk(root_folder_path):
129 root_path = pathlib.Path(root)
130 for file in files:
131 file_path = str(root_path.joinpath(file))
132 file_date = modification_date(file_path)
133 if (result is None) or (result < file_date):
134 result = file_date
135
136 for folder in subdirs:
137 folder_path = str(root_path.joinpath(folder))
138 folder_date = modification_date(folder_path)
139 if (result is None) or (result < folder_date):
140 result = folder_date
141
142 return result
143
144
145def relative_path(path, parent_path):

Callers

nothing calls this directly

Calls 1

modification_dateFunction · 0.85

Tested by

no test coverage detected