⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Tempfile
/
View File Name :
new-c.ri
U:RDoc::AnyMethod[iI"new:ETI"Tempfile::new;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"ICreates a temporary file with permissions 0600 (= only readable and ;TI"8writable by the owner) and opens it with mode "w+".;To:RDoc::Markup::BlankLine o; ; [I"CThe +basename+ parameter is used to determine the name of the ;TI"Ctemporary file. You can either pass a String or an Array with ;TI"F2 String elements. In the former form, the temporary file's base ;TI"@name will begin with the given string. In the latter form, ;TI"Fthe temporary file's base name will begin with the array's first ;TI";element, and end with the second element. For example:;T@o:RDoc::Markup::Verbatim; [I""file = Tempfile.new('hello') ;TI"Gfile.path # => something like: "/tmp/hello2843-8392-92849382--0" ;TI" ;TI"C# Use the Array form to enforce an extension in the filename: ;TI",file = Tempfile.new(['hello', '.jpg']) ;TI"Kfile.path # => something like: "/tmp/hello2843-8392-92849382--0.jpg" ;T:@format0o; ; [I"EThe temporary file will be placed in the directory as specified ;TI"Aby the +tmpdir+ parameter. By default, this is +Dir.tmpdir+.;T@o;; [I"2file = Tempfile.new('hello', '/home/aisaka') ;TI"Ofile.path # => something like: "/home/aisaka/hello2843-8392-92849382--0" ;T; 0o; ; [ I"IYou can also pass an options hash. Under the hood, Tempfile creates ;TI"Kthe temporary file using +File.open+. These options will be passed to ;TI"@+File.open+. This is mostly useful for specifying encoding ;TI"options, e.g.:;T@o;; [ I"CTempfile.new('hello', '/home/aisaka', encoding: 'ascii-8bit') ;TI" ;TI"1# You can also omit the 'tmpdir' parameter: ;TI"3Tempfile.new('hello', encoding: 'ascii-8bit') ;T; 0o; ; [I"INote: +mode+ keyword argument, as accepted by Tempfile, can only be ;TI"Bnumeric, combination of the modes defined in File::Constants.;T@S:RDoc::Markup::Heading: leveli: textI"Exceptions;T@o; ; [I"DIf Tempfile.new cannot find a unique filename within a limited ;TI"6number of tries, then it will raise an exception.;T: @fileI"lib/tempfile.rb;T:0@omit_headings_from_table_of_contents_below000[ I"2(basename="", tmpdir=nil, mode: 0, **options);T@>TI" Tempfile;TcRDoc::NormalClass00