[Tex/LaTex] Make directory tree with folders and files in Tikz

directoryforesttikz-pgf

I borrowed the code from @Gonzalo answer. I want to make directory tree with folders and files like the given the following picture.

enter image description here

The MWE is below:

\documentclass[border=10pt]{standalone}
\usepackage{forest}

\definecolor{fblue}{RGB}{92,144,192}
\definecolor{fgreen}{RGB}{34,162,70}

\newcommand\myfolder[2][fblue]{%
\begin{tikzpicture}[overlay]
\begin{scope}[xshift=20pt]
\filldraw[rounded corners=1pt,fill=#1,draw=white,double=black]
  (-23pt,10pt) -- ++(3pt,5pt) -- ++(18pt,0pt) -- ++(40:3pt) -- ++(9pt,0pt) -- ++(-40:3pt)
  -- (20pt,15pt) -- (23pt,10pt) -- cycle;
\filldraw[rounded corners,draw=white,double=black,top color=#1,bottom color=#1!30]
  (-22pt,-12pt) -- ++(44pt,0pt) -- (25pt,12pt) coordinate (topr) -- ++(-50pt,0pt) coordinate (topl) -- cycle;
\end{scope}  
\end{tikzpicture}%
\makebox[35pt]{\raisebox{-3pt}{{\ttfamily/#2}}}%
}

\begin{document}

\begin{forest}
  for tree={
    font=\sffamily,
    minimum height=0.75cm,
    rounded corners=4pt,
    grow'=0,
    inner ysep=8pt,
    child anchor=west,
    parent anchor=south,
    anchor=west,
    calign=first,
    edge={rounded corners},
    edge path={
      \noexpand\path [draw, \forestoption{edge}]
      (!u.south west) +(12.5pt,0) |- (.child anchor)\forestoption{edge label};
    },
    before typesetting nodes={
      if n=1
        {insert before={[,phantom,minimum height=10pt]}}
        {}
    },
    fit=band,
    s sep=12pt,
    before computing xy={l=25pt},
  }
[{\myfolder[fgreen]{UAFSynopsis}}
  [{\myfolder{Documentation}}]
  [{\myfolder{SynopsisMain}}
    [01Abstract.tex]
    [02Signature.tex]
    [03Introduction.tex]
    [04LiteratureReview.tex]
    [05MaterialMethod.tex]
    [06BackSignature.tex]
    [SynopsisBib.bib]
  ]
 [LICENSE]
 [NEWS.md]
 [README.html]
 [README.md]
 [Makefile]
 [MPhilSynopsis.tex]
 [MPhilSynopsis.pdf]
 [UAFSynopsis.cls]
]
\end{forest}

\end{document}

Questions

  1. How to remove / from folders names and properly aligning them.
  2. Reducing vertical space between two file names

Any help will be highly appreciated. Thanks

Best Answer

Here's an updated version.

\documentclass[tikz,border=10pt,multi,dvipsnames,svgnames,x11names]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{backgrounds}
\begin{document}
% addaswyd o gôd Gonzalo Medina: http://tex.stackexchange.com/a/270761/
\definecolor{fblue}{RGB}{92,144,192}
\definecolor{fgreen}{RGB}{34,162,70}

\forestset{% addaswyd o gôd Gonzalo Medina: http://tex.stackexchange.com/a/270761/
  declare toks={my folder colour}{fblue},
  my folder/.style={
    inner xsep=10pt,
    inner ysep=8pt,
    tikz+={
      \begin{scope}[on background layer]
        \filldraw[rounded corners=1pt, fill=\forestoption{my folder colour}, draw=white, double=black]
        ([xshift=-10pt,yshift=-5pt].north east) -- ++(-4pt,10pt) -- ++(-10pt,0) -- ++(-4pt,-10pt) -- cycle;
        \filldraw[rounded corners, draw=white, double=black, top color=\forestoption{my folder colour}, bottom color=\forestoption{my folder colour}!30]
        ([xshift=-4pt].north east) -- ([xshift=-10pt].south east) -- ([xshift=10pt].south west) -- ([xshift=4pt].north west) -- cycle;
      \end{scope}
    },
  },
}

\begin{forest}
  for tree={% addaswyd o gôd Gonzalo Medina: http://tex.stackexchange.com/a/270761/
    folder,
    font=\sffamily,
    grow'=0,
    edge+={rounded corners},
  }
  [{UAFSynopsis}, my folder=fgreen
     [{Documentation}, my folder]
     [SynopsisMain, my folder
        [01Abstract.tex]
        [02Signature.tex]
        [03Introduction.tex]
        [04LiteratureReview.tex]
        [05MaterialMethod.tex]
        [06BackSignature.tex]
        [SynopsisBib.bib]
     ]
     [LICENSE]
     [NEWS.md]
     [README.html]
     [README.md]
     [Makefile]
     [MPhilSynopsis.tex]
     [MPhilSynopsis.pdf]
     [UAFSynopsis.cls]
  ]
\end{forest}
\end{document}

updated folders