MCPcopy Create free account
hub / github.com/ActiveState/code / getOldest

Method getOldest

recipes/Python/259147_FSList/recipe-259147.py:197–214  ·  view source on GitHub ↗

Returns the file earliest last-modified time.

(self)

Source from the content-addressed store, hash-verified

195 return fname
196
197 def getOldest(self):
198 """
199 Returns the file earliest last-modified time.
200 """
201 flist_copy = []
202 try:
203 flist_copy = zip(map(os.path.getmtime, self), self)
204 except TypeError:
205 # there may be lists of lists
206 temp = self._unwind()
207 flist_copy = zip(map(os.path.getmtime, temp), temp)
208 flist_copy.sort()
209 try:
210 time, fname = flist_copy[0]
211 except IndexError:
212 # probably an empty list
213 return None
214 return fname
215
216 def getNewest(self):
217 """

Callers

nothing calls this directly

Calls 3

_unwindMethod · 0.95
mapFunction · 0.85
sortMethod · 0.45

Tested by

no test coverage detected