⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
CSV
/
Edit File: open-c.ri
U:RDoc::AnyMethod[iI" open:ETI"CSV::open;TT:publico:RDoc::Markup::Document:@parts[$o:RDoc::Markup::Paragraph; [I"possible options elements:;To:RDoc::Markup::Verbatim; [ I"hash form: ;TI"M :invalid => nil # raise error on invalid byte sequence (default) ;TI"< :invalid => :replace # replace invalid byte sequence ;TI"; :undef => :replace # replace undefined conversion ;TI"T :replace => string # replacement string ("?" or "\uFFFD" if not specified) ;T:@format0o:RDoc::Markup::List: @type:BULLET:@items[ o:RDoc::Markup::ListItem:@label0; [o; ; [I";Argument +path+, if given, must be the path to a file.;To;;0; [o; ; [I"2Argument +io+ should be an IO object that is:;To; ;;;[o;;0; [o; ; [I"?Open for reading; on return, the IO object will be closed.;To;;0; [o; ; [I""Positioned at the beginning. ;TI"ETo position at the end, for appending, use method CSV.generate. ;TI"GFor any other positioning, pass a preset \StringIO object instead.;To;;0; [o; ; [I"5Argument +mode+, if given, must be a \File mode ;TI";See {Open Mode}[IO.html#method-c-new-label-Open+Mode].;To;;0; [o; ; [I";Arguments <tt>**options</tt> must be keyword options. ;TI"KSee {Options for Generating}[#class-CSV-label-Options+for+Generating].;To;;0; [ o; ; [I"LThis method optionally accepts an additional <tt>:encoding</tt> option ;TI"Tthat you can use to specify the Encoding of the data read from +path+ or +io+. ;TI"?You must provide this unless your data is in the encoding ;TI"3given by <tt>Encoding::default_external</tt>. ;TI"?Parsing will use this to determine how to parse the data. ;TI"*You may provide a second Encoding to ;TI"9have the data transcoded as it is read. For example,;To;; [I" encoding: 'UTF-32BE:UTF-8' ;T;0o; ; [I".would read +UTF-32BE+ data from the file ;TI"0but transcode it to +UTF-8+ before parsing.;To:RDoc::Markup::BlankLine S:RDoc::Markup::Rule:weighti@Mo; ; [I".These examples assume prior execution of:;To;; [I"&string = "foo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;T;0S;;i@Mo; ; [I"4With no block given, returns a new \CSV object.;T@Mo; ; [I",Create a \CSV object using a file path:;To;; [I"csv = CSV.open(path) ;TI"scsv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\""> ;T;0o; ; [I".Create a \CSV object using an open \File:;To;; [I"%csv = CSV.open(File.open(path)) ;TI"scsv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\""> ;T;0S;;i@Mo; ; [I"GWith a block given, calls the block with the created \CSV object; ;TI"&returns the block's return value:;T@Mo; ; [I"Using a file path:;To;; [I"(csv = CSV.open(path) {|csv| p csv} ;TI"scsv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\""> ;T;0o; ; [I"Output:;To;; [I"j#<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\""> ;T;0o; ; [I"Using an open \File:;To;; [I"3csv = CSV.open(File.open(path)) {|csv| p csv} ;TI"scsv # => #<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\""> ;T;0o; ; [I"Output:;To;; [I"j#<CSV io_type:File io_path:"t.csv" encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\""> ;T;0S;;i@Mo; ; [I"ORaises an exception if the argument is not a \String object or \IO object:;To;; [I"G# Raises TypeError (no implicit conversion of Symbol into String) ;TI"CSV.open(:foo);T;0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"�open(file_path, mode = "rb", **options ) -> new_csv open(io, mode = "rb", **options ) -> new_csv open(file_path, mode = "rb", **options ) { |csv| ... } -> object open(io, mode = "rb", **options ) { |csv| ... } -> object ;TI"csv;T[ I"$(filename, mode="r", **options);T@�FI"CSV;TcRDoc::NormalClass00
Simpan