Changeset 4855 for waeup/branches/ulif-importers/src
- Timestamp:
- 18 Jan 2010, 13:17:38 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-importers/src/waeup/datacenter.py
r4849 r4855 63 63 return result 64 64 65 def getFiles(self ):65 def getFiles(self, sort='name'): 66 66 """Get a list of files stored in `storage`. 67 67 … … 76 76 continue 77 77 result.append(DataCenterFile(fullpath)) 78 if sort == 'date': 79 # sort results in newest-first order... 80 result = sorted(result, key=lambda x: x.getTimeStamp(), 81 reverse=True) 78 82 return result 79 83 … … 210 214 return date.strftime('%c') 211 215 216 def getTimeStamp(self): 217 """Get a (machine readable) timestamp. 218 """ 219 return os.path.getctime(self.context) 220 212 221 def getSize(self): 213 222 """Get a human readable file size.
Note: See TracChangeset for help on using the changeset viewer.