


So I made this version, first walking the directory tree, storing it in a Lua table. Inconvenience: I have to specify the image size beforehand, so listings are likely to be cut off. I made a first version drawing file names as I walked the tree. Lfs and LuaCairo are both cross-platform, so it should work on other systems (tested on French WinXP Pro SP3). I love these little challenges, as they allow me to explore APIs I wanted to dig for quite some time. I scripted it with Lua, using lfs to walk the directories. So it is a code - writing question, and I believe belongs to SO.Īs promised, here is my Cairo version. So any scripting language or library is ok.


I am sorry that this question was removed as not belonging to SO. SVG being HTML5 substandard, would even allow painless inclusion into online documentation. If I had time, I'd write a Visio Extension or may be some command line that produces SVG. It is very surprising that there is no better tool for it. I then printed out the file to console again and screen grabbed it.īefore screen grabbing I had to modify foreground color to black and background color to white, to look better and save ink in a document should that be printed. For example if a subfolder contained 20 similarly typed files that individually were not important to the point I was making, I left just two and replaced the rest with one. I both screen grabbed the result (for short folders) AND for longer folders I redirected to a text file, which I then edited. I had to explan where files (in particular resources and configuration files) reside. The question was related to a documentation sub project. The tool may be commercial but preferably free. The tool must run on Windows, but preferably cross-platform. Given a file tree - a directory with directories in it etc, how would you write a script to create a diagram of the file-tree as a graphic file that I can embed in a word processor document.
