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)
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)
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())
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)