Change file mode and then delete it : delete « File Directory « Ruby






Change file mode and then delete it


file = File.new( "books.txt", "w" )
file.chmod( 0755 )

system "ls -l books.txt"
File.delete( "books.txt" )

 








Related examples in the same category

1.delete either one file at a time or many at once
2.Deleting and Renaming Files