| Server IP : 162.214.74.102 / Your IP : 216.73.217.46 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Dir/ |
Upload File : |
U:RDoc::AnyMethod[iI"
mktmpdir:EFI"Dir::mktmpdir;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"0Dir.mktmpdir creates a temporary directory.;To:RDoc::Markup::BlankLine o;
; [I"4The directory is created with 0700 permission. ;TI"nApplication should not change the permission to make the temporary directory accessible from other users.;T@o;
; [I"HThe prefix and suffix of the name of the directory is specified by ;TI"7the optional first argument, <i>prefix_suffix</i>.;To:RDoc::Markup::List:
@type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o;
; [I"TIf it is not specified or nil, "d" is used as the prefix and no suffix is used.;To;;0; [o;
; [I"GIf it is a string, it is used as the prefix and no suffix is used.;To;;0; [o;
; [I"cIf it is an array, first element is used as the prefix and second element is used as a suffix.;T@o:RDoc::Markup::Verbatim; [I"-Dir.mktmpdir {|dir| dir is ".../d..." }
;TI"6Dir.mktmpdir("foo") {|dir| dir is ".../foo..." }
;TI"BDir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" }
;T:@format0o;
; [I"2The directory is created under Dir.tmpdir or ;TI"Jthe optional second argument <i>tmpdir</i> if non-nil value is given.;T@o;; [I"7Dir.mktmpdir {|dir| dir is "#{Dir.tmpdir}/d..." }
;TI"CDir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." }
;T;0o;
; [
I"If a block is given, ;TI"3it is yielded with the path of the directory. ;TI"0The directory and its contents are removed ;TI"?using FileUtils.remove_entry before Dir.mktmpdir returns. ;TI"(The value of the block is returned.;T@o;; [ I"Dir.mktmpdir {|dir|
;TI" # use the directory...
;TI"' open("#{dir}/foo", "w") { ... }
;TI"}
;T;0o;
; [I"If a block is not given, ;TI",The path of the directory is returned. ;TI"=In this case, Dir.mktmpdir doesn't remove the directory.;T@o;; [
I"dir = Dir.mktmpdir
;TI"begin
;TI" # use the directory...
;TI"' open("#{dir}/foo", "w") { ... }
;TI"ensure
;TI" # remove the directory.
;TI"" FileUtils.remove_entry dir
;TI"end;T;0:
@fileI"lib/tmpdir.rb;T:0@omit_headings_from_table_of_contents_below00I" path;T[ I"(prefix_suffix=nil, *rest);T@QFI"Dir;TcRDoc::NormalClass00