File: //usr/share/ri/3.0.0/system/IO/pwrite-i.ri
U:RDoc::AnyMethod[iI"pwrite:ETI"IO#pwrite;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [
I"MWrites the given string to <em>ios</em> at <i>offset</i> using pwrite() ;TI"Jsystem call. This is advantageous to combining IO#seek and IO#write ;TI"Jin that it is atomic, allowing multiple threads/process to share the ;TI"?same IO object for reading the file at various locations. ;TI"<This bypasses any userspace buffering of the IO layer. ;TI"*Returns the number of bytes written. ;TI"=Raises SystemCallError on error and NotImplementedError ;TI"4if platform does not implement the system call.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [
I""File.open("out", "w") do |f|
;TI"% f.pwrite("ABCDEF", 3) #=> 6
;TI" end
;TI"
;TI"=File.read("out") #=> "\u0000\u0000\u0000ABCDEF";T:@format0:
@fileI" io.c;T:0@omit_headings_from_table_of_contents_below0I".ios.pwrite(string, offset) -> integer
;T0[ I"
(p1, p2);T@FI"IO;TcRDoc::NormalClass00