     super options, data
 
     @kiteController = @getSingleton('kiteController')
+    @appStorage     = @getSingleton('mainController').getAppStorageSingleton 'Finder', '1.0'
 
     @treeController = new NFinderTreeController treeOptions, []
     @treeController.on "file.opened", (file)=> @setRecentFile file.path

        kiteController.emit "UserEnvironmentIsCreated"
        @mount.emit "fs.fetchContents.finished"


  multipleLs:(pathArray, callback)->

    KD.getSingleton('kiteController').run
      withArgs  :
        command : "ls \"#{pathArray.join("\" \"")}\" -lpva --group-directories-first --time-style=full-iso"
    , callback

  fetchStorage:(callback)->

    unless @_storage
      appManager.fetchStorage 'Finder', '1.0', (error, storage) =>
        callback @_storage = storage
    else
      callback @_storage

  setRecentFile:(filePath, callback)->

    @fetchStorage (storage)=>
      # recentFiles = storage.getAt('bucket.recentFiles') or []
      recentFiles = if storage.bucket?.recentFiles? then storage.bucket.recentFiles else []
      unless filePath in recentFiles
        recentFiles.pop() if recentFiles.length is @treeController.getOptions().maxRecentFiles
        recentFiles.unshift filePath

      storage.update {
        $set: 'bucket.recentFiles': recentFiles.slice(0,10)
      }, callback

  setRecentFolder:(folderPath, callback)->

    @fetchStorage (storage)=>

      recentFolders = if storage.bucket?.recentFolders? then storage.bucket.recentFolders else []

      unless folderPath in recentFolders
        recentFolders.push folderPath

      recentFolders.sort (path)-> if path is folderPath then -1 else 0

      storage.update {
        $set: 'bucket.recentFolders': recentFolders
      }, => #log "recentFolder set"

  unsetRecentFolder:(folderPath, callback)->

    @fetchStorage (storage)=>

      recentFolders = if storage.bucket?.recentFolders? then storage.bucket.recentFolders else []

      splicer = ->
        recentFolders.forEach (recentFolderPath)->
          if recentFolderPath.search(folderPath) > -1
            recentFolders.splice recentFolders.indexOf(recentFolderPath), 1
            splicer()
            return

      splicer()
      recentFolders.sort (path)-> if path is folderPath then -1 else 0

      storage.update {
        $set: 'bucket.recentFolders': recentFolders
      }, => #log "recentFolder unset"

    @viewLoaded = yes
    @utils.killWait @loadDefaultStructureTimer

    # temp hack, if page opens in develop section.
    @utils.wait 2500, =>
      @getSingleton("mainView").sidebar._windowDidResize()

  expandInitialPath:(path)->
    pathArray = []
    path      = path.split "/"
    temp      = ''

    for chunk in path
      pathArray.push temp+="/#{chunk}" if chunk

    pathArray.splice 0, 1
    pathArray

  reset:()->

    {initialPath} = @treeController.getOptions()
    @initialPath  = @expandInitialPath initialPath

    @mount = if KD.isLoggedIn()
      {nickname}    = KD.whoami().profile
