def stream():
     zip = ziputil.ZipGenerator(collection['name'])
     for (path, file) in self._model.fileList(
             collection, user=self.getCurrentUser(), subpath=False, mimeFilter=mimeFilter):
         for data in zip.addFile(file, path):
             yield data
     yield zip.footer()
Beispiel #2
0
 def stream():
     zip = ziputil.ZipGenerator(folder['name'])
     for (path, file) in self._model.fileList(
             folder, user=user, subpath=False, mimeFilter=mimeFilter):
         for data in zip.addFile(file, path):
             yield data
     yield zip.footer()
Beispiel #3
0
 def stream():
     zip = ziputil.ZipGenerator()
     for kind in resources:
         model = ModelImporter.model(kind)
         for id in resources[kind]:
             doc = model.load(id=id, user=user, level=AccessType.READ)
             for (path, file) in model.fileList(
                     doc=doc,
                     user=user,
                     includeMetadata=includeMetadata,
                     subpath=True):
                 for data in zip.addFile(file, path):
                     yield data
     yield zip.footer()
Beispiel #4
0
 def stream():
     zip = ziputil.ZipGenerator(item['name'])
     for (path, file) in self._model.fileList(item, subpath=False):
         for data in zip.addFile(file, path):
             yield data
     yield zip.footer()