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='',
|
missing_value='',
|
||||||
required=False)
|
required=False)
|
||||||
|
|
||||||
def copyDataFile(self, targetAddress):
|
def copyDataFile(self, targetParams, targetAddress=None):
|
||||||
""" Copy the external file object with all data to the target address
|
""" Copy the external file object with all data to the destination
|
||||||
given.
|
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):
|
def storage(self):
|
||||||
return component.getUtility(IExternalStorage, name=self.storageName)
|
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):
|
def copyDataFile(self, targetParams, targetAddress=None):
|
||||||
storageParams = self.storageParams
|
storageParams = self.storageParams
|
||||||
externalAddress = self.externalAddress
|
externalAddress = self.externalAddress
|
||||||
|
|
Loading…
Add table
Reference in a new issue