676件ヒット
[601-676件を表示]
(0.094秒)
別のキーワード
キーワード
- advise (12)
- autoclose? (12)
- binmode (12)
- clone (12)
- close (12)
-
close
_ read (12) -
close
_ write (12) - closed? (12)
- dup (12)
- each (72)
-
each
_ byte (24) -
each
_ codepoint (24) -
each
_ line (72) -
external
_ encoding (12) - fcntl (12)
- fdatasync (12)
- fileno (12)
- flush (12)
-
internal
_ encoding (12) - isatty (12)
- path (3)
- pathconf (12)
- pid (12)
- pos (12)
- pos= (12)
- pread (8)
- print (12)
- putc (12)
- pwrite (8)
- readbyte (12)
- readlines (36)
- reopen (36)
-
set
_ encoding _ by _ bom (6) - stat (12)
- sync (12)
- syswrite (12)
- tell (12)
-
to
_ i (12) -
to
_ path (3) - tty? (12)
- wait (12)
-
wait
_ readable (12) - write (12)
検索結果
先頭5件
-
IO
# flush -> self (3014.0) -
IO ポートの内部バッファをフラッシュします。
...
IO ポートの内部バッファをフラッシュします。
このメソッドを使ったとき、即座にメタデータを更新することは保証されません(特にWindowsで)。
即座にメタデータも更新したいときは IO#fsync を使います。
@raise IOError 自身......ープンされていなければ発生します。
@raise Errno::EXXX fflush(3) が失敗した場合に発生します。
//emlist[例][ruby]{
require "tempfile"
Tempfile.open("testtmpfile") do |f|
f.print "test"
File.read(f.path) # => ""
f.flush
File.read(f.path) # => "test"
end
//}... -
IO
# pos=(n) (3014.0) -
ファイルポインタを指定位置に移動します。 IO#seek(n, IO::SEEK_SET) と同じです。
...す。
IO#seek(n, IO::SEEK_SET) と同じです。
@param n 先頭からのオフセットを整数で指定します。
@raise IOError 既に close されている場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "This is line one\nThis is line two\n")
File.open("testfile") d......o |f|
f.pos # => 0
f.pos = 17
f.gets # => "This is line two\n"
end
//}... -
IO
# putc(ch) -> object (3014.0) -
文字 ch を self に出力します。 引数の扱いは Kernel.#putc と同じです。詳細はこちらを参照し てください。ch を返します。
...文字列か文字コード(整数)で与えます。
@raise IOError 自身が書き込み用にオープンされていなければ発生します。
@raise Errno::EXXX 出力に失敗した場合に発生します。
//emlist[例][ruby]{
$stdout.putc "A" # => A
$stdout.putc 65 # => A
//}
@see... -
IO
# reopen(path) -> self (3014.0) -
path で指定されたファイルにストリームを繋ぎ換えます。
...
IO#pos, IO#lineno などはリセットされます。
@param path パスを表す文字列を指定します。
@param mode パスを開く際のモードを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "This...... is line one\nThis is line two\n")
f1 = File.new("testfile", "a+")
f2 = File.new("testfile")
f1.print("This is line three\n")
f2.readlines # => ["This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testfile>
f2.readlines # => ["Th......is is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}
@see Kernel.#open... -
IO
# reopen(path , mode) -> self (3014.0) -
path で指定されたファイルにストリームを繋ぎ換えます。
...
IO#pos, IO#lineno などはリセットされます。
@param path パスを表す文字列を指定します。
@param mode パスを開く際のモードを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "This...... is line one\nThis is line two\n")
f1 = File.new("testfile", "a+")
f2 = File.new("testfile")
f1.print("This is line three\n")
f2.readlines # => ["This is line one\n", "This is line two\n"]
f1.close
f2.reopen("testfile", "r") # => #<File:testfile>
f2.readlines # => ["Th......is is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}
@see Kernel.#open... -
IO
# sync -> bool (3014.0) -
現在の出力が同期モードならば true を返します。そうでない場合は false を返します。
...期モードならば true を返します。そうでない場合は false を返します。
@raise IOError 既に close されていた場合に発生します。
//emlist[例][ruby]{
File.open("testfile", "w") do |f|
f.sync # => false
f.sync = true
f.sync # => true
end
//}... -
IO
# tty? -> bool (3014.0) -
入出力ポートがttyに結合している時、真を返します。そうでない場合 false を返します。
...入出力ポートがttyに結合している時、真を返します。そうでない場合 false を返します。
@raise IOError 既に close されている場合に発生します。
//emlist[例][ruby]{
File.new("testfile").isatty # => false
File.new("/dev/tty").isatty # => true
//}...