# File lib/listen/directory_record.rb, line 164
    def relative_to_base(path)
      return nil unless path[@directory]
      path.sub(%r{^#{Regexp.quote(@directory)}#{File::SEPARATOR}?}, '')
    end