Since you seem to think that the dirtree
solutions won't work, here's an example which I think will show you that they can.
You simply need to create a macro to generate the icon/name pair. Since I don't know how you are implementing your icons, I've made a mock-up here. You'd need to modify it to match the way your icons are actually generated.
\documentclass{article}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{dirtree}
% The following is a dummy icon command
\newcommand\myicon[1]{{\color{#1}\rule{2ex}{2ex}}}
% If you have actual icon images, use \includegraphics to include them
% If you are generating them, put in the appropriate code for them here
% now we make a command for a folder/file which inserts the icon and its label
% adjust this as needed. If you only have 2 icons, then you could create
% a \myfile and \myfolder command with the icon fixed.
\newcommand{\myfolder}[2]{\myicon{#1}\ {#2}}
\begin{document}
\dirtree{%
.1 \myfolder{red}{Mathbook}.
.2 \myfolder{blue}{Pictures}.
.3 \myfolder{green}{math.png}.
.3 \myfolder{green}{math2.png}.
.2 \myfolder{blue}{Exercises}.
.4 \myfolder{brown}{Something}.
}
\end{document}
