Changeset 7053 for main/waeup.sirp/branches/ulif-extimgstore
- Timestamp:
- 9 Nov 2011, 05:50:45 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/branches/ulif-extimgstore/src/waeup/sirp/imagestorage.py
r7035 r7053 319 319 This methods takes into account registered handlers for any 320 320 marker put into the file_id. 321 322 .. seealso:: :class:`DefaultFileStoreHandler` 321 323 """ 322 324 marker, filename, base, ext = self.extractMarker(file_id) … … 328 330 fd = open(path, 'rb') 329 331 return fd 332 333 def getFileByContext(self, context): 334 """Get a file for given context. 335 336 Returns a file already opened for reading. 337 338 If the file cannot be found ``None`` is returned. 339 340 This method takes into account registered handlers and file 341 name choosers for context types. 342 343 This is a convenience method that internally calls 344 :meth:`getFile`. 345 346 .. seealso:: :class:`FileStoreNameChooser`, 347 :class:`DefaultFileStoreHandler`. 348 """ 349 file_id = IFileStoreNameChooser(context).chooseName() 350 return self.getFile(file_id) 330 351 331 352 def createFile(self, filename, f):
Note: See TracChangeset for help on using the changeset viewer.