Logo Search packages:      
Sourcecode: zope-extfile version File versions

def zope-extfile-1.4.2::ExtFile::ExtFile::manage_beforeDelete (   self,
  item,
  container 
)

This method is called, when the object is deleted. To support 
    undo-functionality and because this happens too, when the object 
    is moved (cut-paste) or renamed, the external file is not deleted. 
    It is just renamed to filename.undo and remains in the 
    repository, until it is deleted manually.

Definition at line 882 of file ExtFile.py.

00882                                                   :
        """ This method is called, when the object is deleted. To support 
            undo-functionality and because this happens too, when the object 
            is moved (cut-paste) or renamed, the external file is not deleted. 
            It is just renamed to filename.undo and remains in the 
            repository, until it is deleted manually.
        """
        tmp_fn = self._temp_fsname(self.filename)
        fn = self._fsname(self.filename)
        if isfile(tmp_fn):
            try: os.rename(tmp_fn, fn+'.undo')
            except OSError: pass
            else:
                try: os.remove(fn)
                except OSError: pass
        elif isfile(fn):
            try: os.rename(fn, fn+'.undo')
            except OSError: pass
        return ExtFile.inheritedAttribute("manage_beforeDelete")(self, item, container)

    security.declarePrivate('manage_afterUpdate')
    def manage_afterUpdate(self, filename, content_type, size):


Generated by  Doxygen 1.6.0   Back to index