def generate_mtime_map(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, dirnames, filenames in os.walk(path):
                for item in filenames:
                    try:
                        file_path = os.path.join(directory, item)
                        file_map[file_path] = os.path.getmtime(file_path)
                    except (OSError, __HOLE__):
                        # skip dangling symlinks
                        log.info(
                            'Failed to get mtime on {0}, '
                            'dangling symlink ?'.format(file_path))
                        continue
    return file_map
dataset/ETHPy150Open saltstack/salt/salt/fileserver/__init__.py/generate_mtime_map