Directory entries can only be files or other directories.

Does not handle file like broken symlinks for now
This commit is contained in:
Corey Johnson
2012-09-11 11:07:59 -07:00
parent 528f6ce967
commit 71562a6c33

View File

@@ -18,8 +18,11 @@ class Directory
for path in fs.list(@path)
if fs.isDirectory(path)
directories.push(new Directory(path))
else
else if fs.isFile(path)
files.push(new File(path))
else
console.error "#{path} is neither a file nor a directory."
directories.concat(files)
afterSubscribe: ->