def get_files(storage, ignore_patterns=[], location=''):
 (directories, files) = storage.listdir(location)
 for fn in files:
  if is_ignored(fn, ignore_patterns):
   continue
  if location:
   fn = os.path.join(location, fn)
  (yield fn)
 for dir in directories:
  if is_ignored(dir, ignore_patterns):
   continue
  if location:
   dir = os.path.join(location, dir)
  for fn in get_files(storage, ignore_patterns, dir):
   (yield fn)

def get_files ( storage , ignore_patterns = [ ] , location = '' ) : ( directories , files ) = storage . listdir ( location ) for fn in files : if is_ignored ( fn , ignore_patterns ) : continue if location : fn = os . path . join ( location , fn ) ( yield fn ) for dir in directories : if is_ignored ( dir , ignore_patterns ) : continue if location : dir = os . path . join ( location , dir ) for fn in get_files ( storage , ignore_patterns , dir ) : ( yield fn )
return the list of files that need approval .