--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Opens the file named by filename according to mode (default is ``r'') and returns a new File object. See the description of class IO for a description of mode. The file mode may optionally be specified as a Fixnum by or-ing together the flags (O_RDONLY etc, again described under IO). Optional permission bits may be given in perm. These mode and permission bits are platform dependent; on Unix systems, see open(2) for details.
- !ruby/struct:SM::Flow::VERB
body: " f = File.new("testfile", "r")\n f = File.new("newfile", "w+")\n f = File.new("newfile", File::CREAT|File::TRUNC|File::RDWR, 0644)\n"
full_name: File::new
is_singleton: true
name: new
params: |
File.new(filename, mode="r") => file
File.new(filename [, mode [, perm]]) => file
visibility: public