+
 class FSHelper
 
-  parseWatcherFile = ({ vmName, parentPath, file, user, treeController, osKite })->
   @createFileInstance = (options)->
 
     if typeof options is 'string'

    sortedFiles = partition(files.sort(sortFiles), (file) -> file.isDir)
      .reduce (acc, next) -> acc.concat next

    nickname = KD.nick()
    for file in sortedFiles
      data.push FSHelper.createFile \
        parseWatcherFile {
          vmName
          parentPath
          file
          nickname
          treeController
        }

    return data



    return instance

  parseWatcherFile = ({ machine, parentPath, file, user, treeController })->

    { uid } = machine
    {name, size, mode} = file

    type      = if file.isBroken then 'brokenLink' else \
                if file.isDir then 'folder' else 'file'
    path      = if parentPath is "[#{uid}]/" then "[#{uid}]/#{name}" else \
                "#{parentPath}/#{name}"
    group     = user
    createdAt = file.time

    return { size, user, group, createdAt, mode, type, \
             parentPath, path, name, machine, treeController }

  @parseWatcher = ({ machine, parentPath, files, treeController })->

    data = []
    return data unless files
    files = [files] unless Array.isArray files
