Directory Structure Graphical Treefication Convert a classical directory structure like this:

config.yml
drafts
    begin-with-the-crazy-ideas.textile
    on-simplicity-in-technology.markdown
includes
    footer.html
    header.html


Into this

.
├── config.yml
├── drafts
|   ├── begin-with-the-crazy-ideas.textile
|   └── on-simplicity-in-technology.markdown
└── includes
    ├── footer.html
    └── header.html



Four spaces specify a nested folder or file of the above dir. 
Nested categories levels allowed can vary.


Update


filenames: valid Linux filenames without spaces and linefeeds: any byte except NUL, / and spaces, linefeeds
drawing characters:


| vertical line (U+007C)
─ box drawings light horizontal (U+2500)
├ box drawings light vertical and right (U+251C)



Winner: Shortest Code in Bytes wins!
JavaScript (ES6), 237 128 bytes

f=(s,r=`.\n`+s.replace(/^ */gm,"$&amp;└── "),q=r.replace(/^(.*)( |└)(?=.+\n\1[|└])/m,(_,i,j)=&gt;i+`|├`[+(j&gt;' ')]))=&gt;q==r?r:f(s,q)


Where \n represents the literal newline character. Explanation: r is created from s by prepending the . line and inserting the └── at the end of each line's indent. This is now correct for the last line of the input, but each └ must be "extended" upwards as far as possible. This is the job of q, which searches for a └ and recursively replaces the spaces directly above it with |s unless it reaches another └ which gets turned into ├ instead. The recursion ends when no further replacements can be made. Note that if the character above the └ is a space or a └ then the text to the left of the └ is always the same as that on the previous line so I can just use \1 to test that the one character is above the other.