delete either one file at a time or many at once : delete « File Directory « Ruby






delete either one file at a time or many at once


File.delete("file1.txt")
File.delete("file2.txt", "file3.txt", "file4.txt")
File.unlink("file1.txt")

 








Related examples in the same category

1.Deleting and Renaming Files
2.Change file mode and then delete it