Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
ATContentTypes.adapters.archive.FolderishArchiver Class Reference

List of all members.

Public Member Functions

def __init__
def getRawArchive
def createArchive

Public Attributes

 context

Detailed Description

store your files in a zip file

Definition at line 11 of file archive.py.


Constructor & Destructor Documentation

Definition at line 19 of file archive.py.

00019 
00020     def __init__(self, context):
00021         """
00022         """
00023         self.context = context


Member Function Documentation

def ATContentTypes.adapters.archive.FolderishArchiver.createArchive (   self,
  path,
  accumulator,
  kwargs 
)
get the archive file object

Definition at line 32 of file archive.py.

00032 
00033     def createArchive(self, path, accumulator, **kwargs):
00034         """
00035         get the archive file object
00036         """
00037         recursive = kwargs.get('recursive',1)
00038         adapter = IFilterFolder(self.context)
00039         for item in adapter.listObjects():
00040             if IArchivable.providedBy(item):
00041                 archiver = IArchiver(item)
00042                 folderish = isinstance(archiver,FolderishArchiver)
00043                 if path:
00044                     cpath = '%s/%s' % (path, self.context.getId())
00045                 else:
00046                     cpath = self.context.getId()
00047                 if (recursive and folderish) or not folderish:
00048                     archiver.createArchive(cpath, accumulator, **kwargs)
00049 

Here is the caller graph for this function:

def ATContentTypes.adapters.archive.FolderishArchiver.getRawArchive (   self,
  accumulator = None,
  kwargs 
)

Definition at line 24 of file archive.py.

00024 
00025     def getRawArchive(self, accumulator=None, **kwargs):
00026         """
00027         """
00028         if(not accumulator):
00029             accumulator = ZipAccumulator(self.context)
00030         self.createArchive(None,accumulator, **kwargs)
00031         return accumulator.getRaw()

Here is the call graph for this function:


Member Data Documentation

Definition at line 22 of file archive.py.


The documentation for this class was generated from the following file: