src/admin_toolbelt/storage/__init__.py
def visit_dirs(dirs, policy=UnusedPeriodPolicy(), action=print):
    """Provided a list of directories, ``dirs``, recursively searches for files 
    for which the provided policy returns True, and execute the given action on
    them. ``policy`` and ``action`` should be callable objects accepting a file 
    path as their only argument. By default, prints the path of all files that 
    haven't been accessed or modified in over 30 days.
    
    For example, to institute a purge of any files in the directories over 30 
    days old, you could set ``action=os.remove``.
    """
    for dname in dirs:
        for path, subdirs, files in os.walk(dname):
            for fname in files:
                if policy(os.path.join(path,fname)):
                    action(os.path.join(path,fname))
Provided a list of directories, ``dirs``, recursively searches for files 
    for which the provided policy returns True, and execute the given action on
    them. ``policy`` and ``action`` should be callable objects accepting a file 
    path as their only argument. By default, prints the path of all files that 
    haven't been accessed or modified in over 30 days.
    
    For example, to institute a purge of any files in the directories over 30 
    days old, you could set ``action=os.remove``.
    
Provided a list of directories, ``dirs``, recursively searches for files
for which the provided policy returns True, and execute the given action on
them.

For example, to institute a purge of any files in the directories over 30
days old, you could set ``action=os.remove``.
Provided a list of directories ` ` dirs ` ` recursively searches for files for which the provided policy returns True and execute the given action on them . For example to institute a purge of any files in the directories over 30 days old you could set ` ` action = os . remove ` ` .
def visit_dirs(dirs, policy=UnusedPeriodPolicy(), action=print):
    for dname in dirs:
        for path, subdirs, files in os.walk(dname):
            for fname in files:
                if policy(os.path.join(path,fname)):
                    action(os.path.join(path,fname))
def visit_dirs ( dirs , policy = UnusedPeriodPolicy ( ) , action = print ) : for dname in dirs : for path , subdirs , files in os . walk ( dname ) : for fname in files : if policy ( os . path . join ( path , fname ) ) : action ( os . path . join ( path , fname ) )
Provided a list of directories, ``dirs``, recursively searches for files
for which the provided policy returns True, and execute the given action on
them.
Provided a list of directories ` ` dirs ` ` recursively searches for files for which the provided policy returns True and execute the given action on them .
"""Provided a list of directories, ``dirs``, recursively searches for files 
    for which the provided policy returns True, and execute the given action on
    them. ``policy`` and ``action`` should be callable objects accepting a file 
    path as their only argument. By default, prints the path of all files that 
    haven't been accessed or modified in over 30 days.
    
    For example, to institute a purge of any files in the directories over 30 
    days old, you could set ``action=os.remove``.
    """
dirs
policy
action