def generate_mtime_map(opts, path_map):
 file_map = {}
 for (saltenv, path_list) in six.iteritems(path_map):
  for path in path_list:
   for (directory, dirnames, filenames) in os.walk(path):
    dirnames[:] = [d for d in dirnames if (not is_file_ignored(opts, d))]
    for item in filenames:
     try:
      file_path = os.path.join(directory, item)
      file_map[file_path] = os.path.getmtime(file_path)
     except (OSError, IOError):
      log.info('Failed to get mtime on {0}, dangling symlink ?'.format(file_path))
      continue
 return file_map

def generate_mtime_map ( opts , path_map ) : file_map = { } for ( saltenv , path_list ) in six . iteritems ( path_map ) : for path in path_list : for ( directory , dirnames , filenames ) in os . walk ( path ) : dirnames [ : ] = [ d for d in dirnames if ( not is_file_ignored ( opts , d ) ) ] for item in filenames : try : file_path = os . path . join ( directory , item ) file_map [ file_path ] = os . path . getmtime ( file_path ) except ( OSError , IOError ) : log . info ( 'Failed to get mtime on {0}, dangling symlink ?' . format ( file_path ) ) continue return file_map
generate a dict of filename -> mtime .