Skip to content

Instantly share code, notes, and snippets.

@mattfawcett
Created January 8, 2010 10:14
Show Gist options
  • Save mattfawcett/271957 to your computer and use it in GitHub Desktop.
Save mattfawcett/271957 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'sinatra'
get "/" do
file_name = '20100108-095851-BSMsgLog.csv'
if File.exists?(file_name)
file = File.open(file_name, "r")
contents = file.read
file.close
FileUtils.rm(file_name)
contents
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment