(base_path)
| 50 | |
| 51 | |
| 52 | def build_index(base_path): |
| 53 | index = {} |
| 54 | for root, dirs, files in os.walk(base_path): |
| 55 | for dir_name in dirs: |
| 56 | if dir_name not in index: |
| 57 | index[dir_name] = [] |
| 58 | index[dir_name].append(root) |
| 59 | return index |
| 60 | |
| 61 | |
| 62 | def change_name(name): |