Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFCore.DirectoryView._walker Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 ignore

Detailed Description

Definition at line 65 of file DirectoryView.py.


Constructor & Destructor Documentation

def CMFCore.DirectoryView._walker.__init__ (   self,
  ignore 
)

Definition at line 66 of file DirectoryView.py.

00066 
00067     def __init__(self, ignore):
00068         # make a dict for faster lookup
00069         self.ignore = dict([(x, None) for x in ignore])


Member Function Documentation

def CMFCore.DirectoryView._walker.__call__ (   self,
  listdir,
  dirname,
  names 
)

Definition at line 70 of file DirectoryView.py.

00070 
00071     def __call__(self, listdir, dirname, names):
00072         # filter names inplace, so filtered directories don't get visited
00073         names[:] = [ name
00074                      for name
00075                      in names
00076                      if name not in self.ignore and not ignore_re.match(name) ]
00077         # append with stat info
00078         results = [ (name, stat(path.join(dirname,name))[8])
00079                     for name in names ]
00080         listdir.extend(results)
00081 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 68 of file DirectoryView.py.


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