Mega Code Archive

 
Categories / Ruby / File Directory
 

Changing File Modes and Owner

To change the mode (permissions or access list) of a file, use the chmod method with a mask file = File.new( "books.txt", "w" ) file.chmod( 0755 )