title: Path tree to tree structure
body: <p>Hello suppose you have ordinary unix path tree as input (as string).</p>
  
  <pre><code>root 0
  root/file1.txt 1
  root/file2.txt 2
  root/folder1 3
  root/folder1/file3.txt 4
  root/folder1/file4.txt 5
  e.t.c.
  </code></pre>
  
  <p>What is the better way to convert this string to tree data structure?</p>