Display directories first in the tree view. Style file names at same indent as directory names (beyond disclosure arrow)

This commit is contained in:
Nathan Sobo
2012-04-23 14:59:54 -06:00
parent 55c78e9550
commit b23785f28f
4 changed files with 22 additions and 11 deletions

View File

@@ -9,10 +9,12 @@ class Directory
fs.base(@path)
getEntries: ->
fs.list(@path).map (path) ->
directories = []
files = []
for path in fs.list(@path)
if fs.isDirectory(path)
new Directory(path)
directories.push(new Directory(path))
else
new File(path)
files.push(new File(path))
directories.concat(files)