# File lib/puppet/indirector/file.rb, line 6 6: def destroy(request) 7: if respond_to?(:path) 8: path = path(request.key) 9: else 10: path = request.key 11: end 12: raise Puppet::Error.new("File %s does not exist; cannot destroy" % [request.key]) unless File.exist?(path) 13: 14: Puppet.notice "Removing file %s %s at '%s'" % [model, request.key, path] 15: begin 16: File.unlink(path) 17: rescue => detail 18: raise Puppet::Error, "Could not remove %s: %s" % [request.key, detail] 19: end 20: end