File: //usr/local/rvm/gems/ruby-3.0.2/doc/activesupport-6.1.4.1/ri/File/atomic_write-c.ri
U:RDoc::AnyMethod[iI"atomic_write:ETI"File::atomic_write;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"GWrite to a file atomically. Useful for situations where you don't ;TI"?want other processes or threads to see half-written files.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"3File.atomic_write('important.file') do |file|
;TI" file.write('hello')
;TI" end
;T:@format0o;
; [ I"PThis method needs to create a temporary file. By default it will create it ;TI"Kin the same directory as the destination file. If you don't like this ;TI"Jbehavior you can provide a different directory but it must be on the ;TI"Asame physical filesystem as the file you're trying to write.;T@o;; [I"KFile.atomic_write('/data/something.important', '/data/tmp') do |file|
;TI" file.write('hello')
;TI"end;T;
0:
@fileI"/lib/active_support/core_ext/file/atomic.rb;T:0@omit_headings_from_table_of_contents_below00I"temp_file;T[ I"/(file_name, temp_dir = dirname(file_name));T@ FI" File;TcRDoc::NormalClass00