ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- U:RDoc::AnyMethod[iI" write:ETI"IO::write;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"IOpens the file, optionally seeks to the given offset, writes ;TI"Istring, then returns the length written. #write ensures the ;TI"Hfile is closed before returning. If offset is not given in ;TI"Hwrite mode, the file is truncated. Otherwise, it is not truncated.;To:RDoc::Markup::BlankLineo; ; [ I"PIf +name+ starts with a pipe character ("|") and the receiver ;TI"Nis the IO class, a subprocess is created in the same way as Kernel#open, ;TI"!and its output is returned. ;TI"QConsider to use File.write to disable the behavior of subprocess invocation.;T@o:RDoc::Markup::Verbatim; [ I"6File.write("testfile", "0123456789", 20) #=> 10 ;TI"e# File could contain: "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n" ;TI"6File.write("testfile", "0123456789") #=> 10 ;TI")# File would now read: "0123456789" ;TI"5IO.write("|tr a-z A-Z", "abc") #=> 3 ;TI"+# Prints "ABC" to the standard output ;T: @format0o; ; [I"KIf the last argument is a hash, it specifies options for the internal ;TI",open(). It accepts the following keys:;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I":encoding;T; [ o; ; [I"string or encoding;T@o; ; [I"0Specifies the encoding of the read string. ;TI"1See Encoding.aliases for possible encodings.;T@o;;[I" :mode;T; [ o; ; [I"string or integer;T@o; ; [I"CSpecifies the mode argument for open(). It must start ;TI"?with "w", "a", or "r+", otherwise it will cause an error. ;TI"/See IO.new for the list of possible modes.;T@o;;[I" :perm;T; [ o; ; [I" integer;T@o; ; [I"3Specifies the perm argument for open().;T@o;;[I":open_args;T; [ o; ; [I" array;T@o; ; [I"1Specifies arguments for open() as an array. ;TI"=This key can not be used in combination with other keys.;T@o; ; [I"=See also IO.read for details about +name+ and open_args.;T: @fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I"ÜIO.write(name, string [, offset]) -> integer IO.write(name, string [, offset] [, opt]) -> integer File.write(name, string [, offset]) -> integer File.write(name, string [, offset] [, opt]) -> integer ;T0[I" (*args);T@UFI"IO;TcRDoc::NormalClass00