[shared] utils.py.FileWrapper: added method 'copy' to get a copy of a file.

This commit is contained in:
Gaetan Delannay 2012-12-21 11:38:19 +01:00
parent bba7c589be
commit 6c832e43bb

View file

@ -533,6 +533,10 @@ class FileWrapper:
return return
return filePath return filePath
def copy(self):
'''Returns a copy of this file.'''
return FileWrapper(self._zopeFile._getCopy(self._zopeFile))
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
def getMimeType(fileName): def getMimeType(fileName):
'''Tries to guess mime type from p_fileName.''' '''Tries to guess mime type from p_fileName.'''