code: def generate_mtime_map(opts, path_map):
      '''
      Generate a dict of filename -> mtime
      '''
      file_map = {}
      for saltenv, path_list in six.iteritems(path_map):
          for path in path_list:
              for directory, _, filenames in salt.utils.path.os_walk(path):
                  for item in filenames:
                      try:
                          file_path = os.path.join(directory, item)
                          # Don't walk any directories that match
                          # file_ignore_regex or glob
                          if is_file_ignored(opts, file_path):
                              continue
                          file_map[file_path] = os.path.getmtime(file_path)
                      except (OSError, IOError):
                          # skip dangling symlinks
                          log.info(
                              'Failed to get mtime on %s, dangling symlink?',
                              file_path
                          )
                          continue
      return file_maf generate_mtime_map(opts, path_map):
      '''
      Generate a dict of filename -> mtime
      '''
      file_map = {}
      for saltenv, path_list in six.iteritems(path_map):
          for path in path_list:
              for directory, _, filenames in salt.utils.path.os_walk(path):
                  for item in filenames:
                      try:
                          file_path = os.path.join(directory, item)
                          # Don't walk any directories that match
                          # file_ignore_regex or glob
                          if is_file_ignored(opts, file_path):
                              continue
                          file_map[file_path] = os.path.getmtime(file_path)
                      except (OSError, IOError):
                          # skip dangling symlinks
                          log.info(
                              'Failed to get mtime on %s, dangling symlink?',
                              file_path
                          )
                          continue
      return file_map
docs: Generate a dict of filename -> mtime