这是我的问题。我使用 os.walk 获取特定目录下的所有文件路径并将路径存储在这样的文件中
/indexes/attachment/CCTBAU/CCTBAU-13/87009
/indexes/attachment/CCTBAU/CCTBAU-19/91961
/indexes/attachment/CCTBAU/CCTBAU-19/thumbs/_thumb_91961.png
/indexes/attachment/CCTBAU/CCTBAU-11/86413
/indexes/attachment/CCTBAU/CCTBAU-11/thumbs/_thumb_86412.png
/indexes/attachment/CCTBAU/CCTBAU-11/thumbs/_thumb_86413.png
/indexes/attachment/CCTBAU/CCTBAU-12/86614
/indexes/attachment/CCTBAU/CCTBAU-16/90240
/indexes/attachment/CCTBAU/CCTBAU-17/90241
/indexes/attachment/ACD/ACD-200/91345
/indexes/attachment/ACD/ACD-200/96305
/indexes/attachment/ACD/ACD-200/99169
/indexes/attachment/ACD/ACD-201/91344
/indexes/attachment/ACD/ACD-202/91346
/indexes/attachment/ACD/ACD-197/88916
/indexes/attachment/ACD/ACD-189/73799
/indexes/attachment/ACD/ACD-38/60709
/indexes/attachment/ACD/ACD-198/88918
现在,我想通过读取文件中的所有路径来获取文件层次结构,也就是说我读取了文件并获取了所有路径,那么我可以知道文件层次结构是
index
|--attachment
|-----ACD
| |---ACD-200
| |---...
|
|-----CCTBAU
|----CCTBAU-13
|----...
谁能帮助解决这个问题?提前致谢!