1件ヒット
[1-1件を表示]
(0.261秒)
ライブラリ
- ビルトイン (1)
検索結果
-
IO
. write(path , string , offset=nil , **opts) -> Integer (18940.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...キーワード引数はファイルを開くときに使われ、エンコーディングなどを指定することができます。
詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@par......s line three\nAnd so on...\n"
IO.write("testfile", text) # => 66
IO.write("testfile", "0123456789", 20) #=> 10
IO.read("testfile")
# => "This is line one\nThi0123456789two\nThis is line three\nAnd so on...\n"
IO.write("testfile", "0123456789") #=> 10
IO.read("testfile")......# => "0123456789"
//}
@see IO.binwrite...