Server IP : 111.118.215.189 / Your IP : 216.73.216.153 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /proc/thread-self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Dir/ |
[ Home ] | [ C0mmand ] | [ 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