如何在Rust中将目录路径的平面列表转换为分层结构?
我的输入是文件系统路径的平面列表,这些文件系统路径是单个顶级目录的所有子目录(或其中的文件)。
我的最终输出应该是:
路径的文本分层显示,例如unix tree命令的显示。
具有与(1)匹配的逻辑结构的路径的分层JSON序列化
I have created an intermediate data structure, which is a self-referencing struct Dir that has a name and a vector of Box'ed child struct D...