PHP 8.2.31
Preview: mktmpdir-c.yaml Size: 2.34 KB
/proc/thread-self/root/opt/alt/ruby18/share/ri/1.8/system/Dir/mktmpdir-c.yaml

--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: path
comment: 
- !ruby/struct:SM::Flow::P 
  body: Dir.mktmpdir creates a temporary directory.
- !ruby/struct:SM::Flow::P 
  body: The directory is created with 0700 permission.
- !ruby/struct:SM::Flow::P 
  body: The prefix and suffix of the name of the directory is specified by the optional first argument, <em>prefix_suffix</em>.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: If it is not specified or nil, &quot;d&quot; is used as the prefix and no suffix is used.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: If it is a string, it is used as the prefix and no suffix is used.
  - !ruby/struct:SM::Flow::LI 
    label: "-"
    body: If it is an array, first element is used as the prefix and second element is used as a suffix.
  type: :BULLET
- !ruby/struct:SM::Flow::VERB 
  body: " Dir.mktmpdir {|dir| dir is &quot;.../d...&quot; }\n Dir.mktmpdir(&quot;foo&quot;) {|dir| dir is &quot;.../foo...&quot; }\n Dir.mktmpdir([&quot;foo&quot;, &quot;bar&quot;]) {|dir| dir is &quot;.../foo...bar&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: The directory is created under Dir.tmpdir or the optional second argument <em>tmpdir</em> if non-nil value is given.
- !ruby/struct:SM::Flow::VERB 
  body: " Dir.mktmpdir {|dir| dir is &quot;#{Dir.tmpdir}/d...&quot; }\n Dir.mktmpdir(nil, &quot;/var/tmp&quot;) {|dir| dir is &quot;/var/tmp/d...&quot; }\n"
- !ruby/struct:SM::Flow::P 
  body: If a block is given, it is yielded with the path of the directory. The directory and its contents are removed using FileUtils.remove_entry_secure before Dir.mktmpdir returns. The value of the block is returned.
- !ruby/struct:SM::Flow::VERB 
  body: " Dir.mktmpdir {|dir|\n   # use the directory...\n   open(&quot;#{dir}/foo&quot;, &quot;w&quot;) { ... }\n }\n"
- !ruby/struct:SM::Flow::P 
  body: If a block is not given, The path of the directory is returned. In this case, Dir.mktmpdir doesn't remove the directory.
- !ruby/struct:SM::Flow::VERB 
  body: " dir = Dir.mktmpdir\n begin\n   # use the directory...\n   open(&quot;#{dir}/foo&quot;, &quot;w&quot;) { ... }\n ensure\n   # remove the directory.\n   FileUtils.remove_entry_secure dir\n end\n"
full_name: Dir::mktmpdir
is_singleton: true
name: mktmpdir
params: (prefix_suffix=nil, tmpdir=nil) {|path| ...}
visibility: public

Directory Contents

Dirs: 0 × Files: 27

Name Size Perms Modified Actions
397 B lrw-r--r-- 2023-07-26 13:47:06
Edit Download
1.97 KB lrw-r--r-- 2023-07-26 13:47:06
Edit Download
1.46 KB lrw-r--r-- 2023-07-26 13:47:06
Edit Download
420 B lrw-r--r-- 2023-07-26 13:47:06
Edit Download
425 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
387 B lrw-r--r-- 2023-07-26 13:47:06
Edit Download
629 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
547 B lrw-r--r-- 2023-07-26 13:47:06
Edit Download
643 B lrw-r--r-- 2023-07-26 13:47:06
Edit Download
451 B lrw-r--r-- 2023-07-26 13:47:06
Edit Download
3.46 KB lrw-r--r-- 2023-07-26 13:47:07
Edit Download
269 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
605 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
2.34 KB lrw-r--r-- 2023-07-26 13:47:07
Edit Download
277 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
510 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
397 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
636 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
468 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
447 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
526 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
461 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
385 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
699 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
470 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
251 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download
387 B lrw-r--r-- 2023-07-26 13:47:07
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).