1432件ヒット
[1-100件を表示]
(0.089秒)
ライブラリ
- ビルトイン (1156)
- etc (12)
- expect (24)
-
io
/ console (132) -
io
/ nonblock (24) -
io
/ wait (72) - scanf (12)
キーワード
- << (12)
- advise (12)
- autoclose= (12)
- autoclose? (12)
- binmode (12)
- binmode? (12)
- bytes (14)
- chars (14)
- clone (12)
- close (12)
-
close
_ on _ exec= (12) -
close
_ on _ exec? (12) -
close
_ read (12) -
close
_ write (12) - closed? (12)
- codepoints (14)
- cooked (12)
- cooked! (12)
- dup (12)
- each (72)
-
each
_ byte (24) -
each
_ char (24) -
each
_ codepoint (24) -
each
_ line (72) - echo? (12)
- eof (12)
- eof? (12)
- expect (24)
-
external
_ encoding (12) - fcntl (12)
- fdatasync (12)
- fileno (12)
- flush (12)
- fsync (12)
- getbyte (12)
- getc (12)
- getch (12)
- gets (36)
- iflush (12)
-
internal
_ encoding (12) - ioctl (12)
- ioflush (12)
- isatty (12)
- lineno (12)
- lines (42)
- noecho (12)
- nonblock (12)
- nonblock? (12)
- nread (12)
- oflush (12)
- path (3)
- pathconf (12)
- pid (12)
- pos (12)
- pread (8)
- print (12)
- printf (12)
- putc (12)
- puts (12)
- pwrite (8)
- raw (12)
- raw! (12)
- read (12)
-
read
_ nonblock (12) - readbyte (12)
- readchar (12)
- readline (36)
- readlines (36)
- readpartial (12)
- ready? (12)
- reopen (36)
- rewind (12)
- scanf (12)
- seek (12)
-
set
_ encoding (36) -
set
_ encoding _ by _ bom (6) - stat (12)
- sync (12)
- sysread (12)
- sysseek (12)
- syswrite (12)
- tell (12)
-
to
_ i (12) -
to
_ io (12) -
to
_ path (3) - tty? (12)
- ungetbyte (12)
- ungetc (12)
- wait (12)
-
wait
_ readable (12) -
wait
_ writable (24) - winsize (12)
- write (12)
-
write
_ nonblock (12)
検索結果
先頭5件
-
IO
# advise(advice , offset=0 , len=0) -> nil (138.0) -
posix_fadvise(2) を呼びだし、 ファイルへのアクセスパターンをOSに知らせます。
...:normal - デフォルト
* :sequential - データは前から順にアクセスされる
* :random - データはランダムアクセスされる
* :willneed - データはこの直後にアクセスされる
* :dontneed - データは直後にはアクセスしない
* :noreuse - デ......表すシンボル
@param offset パターンを指定するデータの先頭位置
@param len パターンを指定するデータの長さ
@raise IOError ストリームが既に閉じられているときに発生する例外
@raise Errno::EBADF ファイルデスクリプタが不正である... -
IO
# close _ on _ exec? -> bool (134.0) -
自身に close-on-exec フラグが設定されていた場合 true を返します。 そうでない場合に false を返します。
...自身に close-on-exec フラグが設定されていた場合 true を返します。
そうでない場合に false を返します。
f = open("/dev/null")
f.close_on_exec? #=> true
f.close_on_exec = false
f.close_on_exec? #=> false
f.close_on_exec......= true
f.close_on_exec? #=> true
@see IO#close_on_exec=... -
IO
# internal _ encoding -> Encoding | nil (120.0) -
IO の内部エンコーディングを返します。 内部エンコーディングが指定されていない場合は nil を返します。
...
IO の内部エンコーディングを返します。
内部エンコーディングが指定されていない場合は nil を返します。
//emlist[例][ruby]{
IO.write("testfile", "abcde")
File.open("testfile") do |f|
p f.internal_encoding # => nil
f.set_encoding("ASCII-8BIT", "EUC-JP"......)
p f.internal_encoding # => #<Encoding:EUC-JP>
end
//}... -
IO
# autoclose? -> bool (118.0) -
auto-close フラグを返します。
...auto-close フラグを返します。
//emlist[例][ruby]{
IO.open(IO.sysopen("testfile")) do |io|
io.autoclose? # => true
io.autoclose = false
io.autoclose? # => false
end
//}
@see IO#autoclose=... -
IO
# set _ encoding(enc _ str , **opts) -> self (114.0) -
IO のエンコーディングを設定します。
...
IO のエンコーディングを設定します。
引数が "A:B" のようにコロンで区切られた文字列の場合は、
A を外部エンコーディング、 B を内部エンコーディングに指定します。
引数が一つで、上のような形式でない場合には、......oding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")......coding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")... -
IO
# set _ encoding(ext _ enc) -> self (114.0) -
IO のエンコーディングを設定します。
...
IO のエンコーディングを設定します。
引数が "A:B" のようにコロンで区切られた文字列の場合は、
A を外部エンコーディング、 B を内部エンコーディングに指定します。
引数が一つで、上のような形式でない場合には、......oding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")......coding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")... -
IO
# set _ encoding(ext _ enc , int _ enc , **opts) -> self (114.0) -
IO のエンコーディングを設定します。
...
IO のエンコーディングを設定します。
引数が "A:B" のようにコロンで区切られた文字列の場合は、
A を外部エンコーディング、 B を内部エンコーディングに指定します。
引数が一つで、上のような形式でない場合には、......oding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")......coding オブジェクトを指定します。
@param int_enc 内部エンコーディングを表す文字列か Encoding オブジェクトを指定します。
@param opts エンコーディング変換のオプション
例:
io = File.open(file)
io.set_encoding("ASCII-8BIT", "EUC-JP")... -
IO
# set _ encoding _ by _ bom -> Encoding | nil (114.0) -
BOM から IO のエンコーディングを設定します。
...BOM から IO のエンコーディングを設定します。
自身が BOM から始まる場合、BOM を読み進めて外部エンコーディングをセットし、セットしたエンコーディングを返します。
BOM が見つからなかった場合は nil を返します。
自.......open("bom.txt", "rb") do |io|
p io.set_encoding_by_bom #=> #<Encoding:UTF-8>
str = io.read
p str #=> "abc"
p str.encoding #=> #<Encoding:UTF-8>
end
File.write("nobom.txt", "abc")
File.open("nobom.txt", "rb") do |io|
p io.set_encoding_by_bom #=>... -
IO
# stat -> File :: Stat (114.0) -
ファイルのステータスを含む File::Stat オブジェクトを生成して 返します。
...@raise IOError 既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
File.open("testfile") do |f|
s = f.stat
"%o" % s.mode # => "100644"
s.blksize # => 4096
s.atime # => 2018-03-01 23:19:5...