Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFCore.zcml Namespace Reference

Classes

class  IRegisterDirectoryDirective

Functions

def registerDirectory
def cleanUp

Variables

list _directory_regs = []

Function Documentation

Definition at line 84 of file zcml.py.

00084 
00085 def cleanUp():
00086     global _directory_regs
00087     for reg_key in _directory_regs:
00088         for key in _dirreg._directories.keys():
00089             if key.startswith(reg_key):
00090                del _dirreg._directories[key]
00091     _directory_regs = []

def CMFCore.zcml.registerDirectory (   _context,
  name,
  directory = None,
  recursive = False,
  ignore = ignore 
)
Add a new directory to the registry.

Definition at line 64 of file zcml.py.

00064 
00065                       ignore=ignore):
00066     """ Add a new directory to the registry.
00067     """
00068     if directory is None:
00069         subdir = 'skins/%s' % str(name)
00070         filepath = path.join(_context.package.__path__[0], 'skins', str(name))
00071     else:
00072         subdir = str(directory[len(_context.package.__path__[0])+1:])
00073         filepath = str(directory)
00074 
00075     reg_key = _generateKey(_context.package.__name__, subdir)
00076     _directory_regs.append(reg_key)
00077 
00078     _context.action(
00079         discriminator = ('registerDirectory', reg_key),
00080         callable = _dirreg.registerDirectoryByKey,
00081         args = (filepath, reg_key, int(recursive), ignore)
00082         )
00083 

Here is the call graph for this function:


Variable Documentation

Definition at line 62 of file zcml.py.