ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ÿØÿà JFIF    ÿÛ „  ( %!1!%)+//.383,7(-.+  -%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ     ÿÄ J    ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ   ÿÄ *  !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú "SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5 ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍѶ¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e ríV ?> ......................................... ............................................................................. ???????????????????????????????????? ???????????????????????????????????? U:RDoc::AnyMethod[iI" create:ETI"Tempfile::create;TT: publico:RDoc::Markup::Document: @parts['o:RDoc::Markup::Paragraph; [I"3Creates a file in the underlying file system; ;TI"3returns a new \File object based on that file.;To:RDoc::Markup::BlankLineo; ; [I"JWith no block given and no arguments, creates and returns file whose:;T@o:RDoc::Markup::List: @type: BULLET: @items[ o:RDoc::Markup::ListItem: @label0; [o; ; [I"4Class is {File}[rdoc-ref:File] (not \Tempfile).;To;;0; [o; ; [I"DDirectory is the system temporary directory (system-dependent).;To;;0; [o; ; [I"4Generated filename is unique in that directory.;To;;0; [o; ; [I"$Permissions are 0600; ;TI"'w+' (read/write mode, positioned at the end).;T@o; ; [I"PThe temporary file removal depends on the keyword argument +anonymous+ and ;TI"&whether a block is given or not. ;TI"FSee the description about the +anonymous+ keyword argument later.;T@o; ; [I" Example:;T@o:RDoc::Markup::Verbatim; [%I"Ef = Tempfile.create # => # ;TI"'f.class # => File ;TI"?f.path # => "/tmp/20220505-9795-17ky6f6" ;TI"+f.stat.mode.to_s(8) # => "100600" ;TI" f.close ;TI"'File.exist?(f.path) # => true ;TI"File.unlink(f.path) ;TI"(File.exist?(f.path) # => false ;TI" ;TI"Tempfile.create {|f| ;TI" f.puts "foo" ;TI" f.rewind ;TI"* f.read # => "foo\n" ;TI"@ f.path # => "/tmp/20240524-380207-oma0ny" ;TI"' File.exist?(f.path) # => true ;TI"B} # The file is removed at block exit. ;TI" ;TI"*f = Tempfile.create(anonymous: true) ;TI"5# The file is already removed because anonymous ;TI"Gf.path # => "/tmp/" (no filename since no file) ;TI"f.puts "foo" ;TI"f.rewind ;TI"*f.read # => "foo\n" ;TI" f.close ;TI" ;TI"+Tempfile.create(anonymous: true) {|f| ;TI"7 # The file is already removed because anonymous ;TI"G f.path # => "/tmp/" (no filename since no file) ;TI" f.puts "foo" ;TI" f.rewind ;TI"* f.read # => "foo\n" ;TI"} ;T: @format0o; ; [I"DThe argument +basename+, if given, may be one of the following:;T@o; ; ;;[o;;0; [o; ; [I"=A string: the generated filename begins with +basename+:;T@o;; [I"GTempfile.create('foo') # => # ;T;0o;;0; [o; ; [I"8An array of two strings [prefix, suffix]: ;TI"Hthe generated filename begins with +prefix+ and ends with +suffix+:;T@o;; [I"RTempfile.create(%w/foo .jpg/) # => # ;T;0o; ; [I"[With arguments +basename+ and +tmpdir+, the file is created in the directory +tmpdir+:;T@o;; [I"ITempfile.create('foo', '.') # => # ;T;0o; ; [I"NKeyword arguments +mode+ and +options+ are passed directly to the method ;TI"%{File.open}[rdoc-ref:File.open]:;T@o; ; ;;[o;;0; [o; ; [I"3The value given for +mode+ must be an integer ;TI"Dand may be expressed as the logical OR of constants defined in ;TI"1{File::Constants}[rdoc-ref:File::Constants].;To;;0; [o; ; [I"AFor +options+, see {Open Options}[rdoc-ref:IO@Open+Options].;T@o; ; [I"IThe keyword argument +anonymous+ specifies when the file is removed.;T@o; ; ;;[ o;;0; [o; ; [I"Qanonymous=false (default) without a block: the file is not removed.;To;;0; [o; ; [I"`anonymous=false (default) with a block: the file is removed after the block exits.;To;;0; [o; ; [I"Sanonymous=true without a block: the file is removed before returning.;To;;0; [o; ; [I"Zanonymous=true with a block: the file is removed before the block is called.;T@o; ; [ I"CIn the first case (anonymous=false without a block), ;TI",the file is not removed automatically. ;TI"%It should be explicitly closed. ;TI"7It can be used to rename to the desired filename. ;TI"@If the file is not needed, it should be explicitly removed.;T@o; ; [I"kThe File#path method of the created file object returns the temporary directory with a trailing slash ;TI"when +anonymous+ is true.;T@o; ; [I"\When a block is given, it creates the file as described above, passes it to the block, ;TI"$and returns the block's value. ;TI"XBefore the returning, the file object is closed and the underlying file is removed:;T@o;; [I"JTempfile.create {|file| file.path } # => "/tmp/20220505-9795-rkists" ;T;0o; ; [I"Implementation note:;T@o; ; [I"^The keyword argument +anonymous=true+ is implemented using FILE_SHARE_DELETE on Windows. ;TI" O_TMPFILE is used on Linux.;T@o; ; [I"Related: Tempfile.new.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[I"L(basename="", tmpdir=nil, mode: 0, anonymous: false, **options, &block);T@FI" Tempfile;TcRDoc::NormalClass00