To delete a file in Ruby you can use the following snippet.

Sample Ruby

File.delete('filePath')  

One thought on “How to delete a file in Ruby”

Leave a Reply