 
   onDidRemoveEntries: (callback) ->
     @emitter.on('did-remove-entries', callback)
+
+  onDidCollapse: (callback) ->
+    @emitter.on('did-collapse', callback)
+
+  onDidExpand: (callback) ->
+    @emitter.on('did-expand', callback)
 
   loadRealPath: ->
     if @useSyncFS

    @expansionState.isExpanded = false
    @expansionState = @serializeExpansionState()
    @unwatch()

  # Public: Expand this directory, load its children, and start watching it for
  # changes.

    @expansionState.isExpanded = true
    @reload()
    @watch()
    @emitter.emit('did-expand')

  serializeExpansionState: ->
    expansionState = {}
