         @openSelectedEntry(false) if entry instanceof FileView
         entry.toggleExpansion(isRecursive) if entry instanceof DirectoryView
       when 2
-        if entry.is('.selected.file')
+        if entry instanceof FileView
           atom.workspaceView.getActiveView()?.focus()
-        else if entry.is('.selected.directory')
+        else if DirectoryView
           entry.toggleExpansion(isRecursive)
 
     false

      atom.clipboard.write(pathToCopy)

  entryForPath: (entryPath) ->
    return null

    fn = (bestMatchEntry, element) ->
      entry = $(element).view()
      if entry.getPath() is entryPath
        entry
      else if entry.getPath().length > bestMatchEntry.getPath().length and entry.directory?.contains(entryPath)
        entry
      else
        bestMatchEntry

    @list.find(".entry").toArray().reduce(fn, @root)

  selectEntryForPath: (entryPath) ->
    @selectEntry(@entryForPath(entryPath))

      @show()

  entryClicked: (e) ->
    entry = e.currentTarget
    isRecursive = e.altKey || false
    switch e.originalEvent?.detail ? 1
      when 1
