File.new creates a new object of the class File using the method new. : File.new « File Directory « Ruby
- Ruby
- File Directory
- File.new
File.new creates a new object of the class File using the method new.
file1 = File.new("Sample", "r")
Related examples in the same category