4件ヒット
[1-4件を表示]
(0.078秒)
キーワード
- binwrite (1)
-
internal
_ encoding (1) - pos= (1)
検索結果
先頭4件
-
Pathname
# write(string , offset=nil , **opts) -> Integer (54643.0) -
IO.write(self.to_s, string, offset, **opts)と同じです。
@see IO.write -
Pathname
# binwrite(string , offset=nil) -> Integer (18604.0) -
IO.binwrite(self.to_s, *args)と同じです。
IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite -
IO
# pos=(n) (70.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") do |f|
f.pos # => 0
f.pos = 17
f.gets # => "This is line two\... -
IO
# internal _ encoding -> Encoding | nil (40.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
//}