Back to index

plone3  3.1.7
Classes | Functions
GenericSetup.content Namespace Reference

Classes

class  FolderishExporterImporter
class  CSVAwareFileAdapter
class  INIAwareFileAdapter
class  SimpleINIAware
class  FauxDAVRequest
class  FauxDAVResponse
class  DAVAwareFileAdapter

Functions

def exportSiteStructure
def importSiteStructure
def _globtest

Function Documentation

def GenericSetup.content._globtest (   globpattern,
  namelist 
) [private]
Filter names in 'namelist', returning those which match 'globpattern'.

Definition at line 233 of file content.py.

00233 
00234 def _globtest(globpattern, namelist):
00235     """ Filter names in 'namelist', returning those which match 'globpattern'.
00236     """
00237     import re
00238     pattern = globpattern.replace(".", r"\.")       # mask dots
00239     pattern = pattern.replace("*", r".*")           # change glob sequence
00240     pattern = pattern.replace("?", r".")            # change glob char
00241     pattern = '|'.join(pattern.split())             # 'or' each line
00242 
00243     compiled = re.compile(pattern)
00244 
00245     return filter(compiled.match, namelist)
00246 

Here is the caller graph for this function:

Definition at line 41 of file content.py.

00041 
00042 def exportSiteStructure(context):
00043     IFilesystemExporter(context.getSite()).export(context, 'structure', True)

Here is the call graph for this function:

Definition at line 44 of file content.py.

00044 
00045 def importSiteStructure(context):
00046     IFilesystemImporter(context.getSite()).import_(context, 'structure', True)
00047 
00048 
00049 #
00050 #   Filesystem export/import adapters
#