 {BasePipe} = require "../pipe"
 
 readFile = RSVP.denodeify fs.readFile
+realpath = RSVP.denodeify fs.realpath
 
 module.exports = class ExtPipe extends BasePipe
     @schema: ->

        .catch (err) =>
            @log "error", "Could not read", name

    start: ->
        super new RSVP.Promise (resolve, reject) =>
            @watcher = sane @config.basedir,
                glob: [@config.pattern],

                    @fileUnlink filepath

    stop: ->
        return if not @config.basedir
        @watcher.close() if @config.continuous
