         when 'rename', 'change', 'delete'
           @path = newFilePath if event is 'rename'
           callback.call(this, event, newFilePath) if typeof callback is 'function'
-          @emit('change', event, newFilePath)
+          @emitter.emit('did-change', {event, newFilePath})
         when 'child-rename'
           if @isWatchingParent
             @onChange('rename', newFilePath) if @path is oldFilePath


    @disposable = @handleWatcher.onDidChange(@onChange)

  close: ->
    @disposable.dispose()
    @handleWatcher.closeIfNoListener()


      binding.unwatch(@handle)
      handleWatchers.remove(@handle)

class PathWatcher
  isWatchingParent: false
  path: null
  handleWatcher: null

  constructor: (filePath, callback) ->
    @path = filePath
    @emitter = new Emitter()

    # On Windows watching a file is emulated by watching its parent folder.
    if process.platform is 'win32'
