external files: use real file modification date for 'modified' information
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3966 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
d0dc11086e
commit
88b4e19697
2 changed files with 10 additions and 3 deletions
|
@ -786,9 +786,12 @@ class IExternalFile(IFile):
|
|||
missing_value='',
|
||||
required=False)
|
||||
|
||||
def copyDataFile(self, targetAddress):
|
||||
""" Copy the external file object with all data to the target address
|
||||
given.
|
||||
def copyDataFile(self, targetParams, targetAddress=None):
|
||||
""" Copy the external file object with all data to the destination
|
||||
specified by target params and target address.
|
||||
|
||||
If no target address is given the external address of the
|
||||
object is used.
|
||||
"""
|
||||
|
||||
|
||||
|
|
|
@ -402,6 +402,10 @@ class ExternalFileAdapter(FileAdapter):
|
|||
def storage(self):
|
||||
return component.getUtility(IExternalStorage, name=self.storageName)
|
||||
|
||||
@Lazy
|
||||
def modified(self):
|
||||
return self.storage.getMTime(self.externalAddress, self.storageParams)
|
||||
|
||||
def copyDataFile(self, targetParams, targetAddress=None):
|
||||
storageParams = self.storageParams
|
||||
externalAddress = self.externalAddress
|
||||
|
|
Loading…
Add table
Reference in a new issue