open(*args) public

With no associated block, File.open is a synonym for File.new. If the optional code block is given, it will be passed the opened file as an argument, and the File object will automatically be closed when the block terminates. In this instance, File.open returns the value of the block.

See IO.new for a list of values for the opt parameter.

Show source
Register or log in to add new notes.