制作文件结构图有多种方法:

Windows

1
2
3
4
5
6
7
8
9
10
11
# 显示文件夹结构
tree

# 显示所有文件(包括子目录)
tree /f

# 将结果保存到文件
tree /f > file_structure.txt

# 指定深度
tree /f /L 3

macOS / Linux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 安装 tree 命令(如果没有)
brew install tree # macOS
sudo apt install tree # Ubuntu/Debian

# 基本使用
tree

# 显示所有文件
tree -a

# 指定深度
tree -L 3

# 只显示目录
tree -d

# 保存到文件
tree > file_structure.txt