示例#1
0
 def __setstate__(self, state):
     """ Updates """
     NyFSFile.inheritedAttribute("__setstate__")(self, state)
     if not hasattr(self, '_ext_file'):
         etitle = getattr(self, 'title', 'File system data')
         eid = getattr(self, '__name__', 'data.fs')
         self._ext_file = ExtFile(eid, etitle)
示例#2
0
    def __init__(self, id, title, file, content_type='', precondition=''):
        try: id = id()
        except TypeError: pass

        self.__name__ = id
        self.title = title
        self.data = ''
        self.size = 0
        self.content_type = content_type
        self.precondition = precondition
        self._ext_file = ExtFile(id, title)
示例#3
0
 def manage_beforeUpdate(self, item=None, container=None):
     self_id = getattr(self, '__name__', 'data.fs')
     self._ext_file = ExtFile(self_id, self.title_or_id())
示例#4
0
 def manage_beforeUpdate(self, item=None, container=None):
     item = item or self._ext_file
     container = container or self
     self._ext_file.manage_beforeDelete(item, container)
     self_id = getattr(self, '__name__', 'data.fs')
     self._ext_file = ExtFile(self_id, self.title)