22件ヒット
[1-22件を表示]
(0.081秒)
ライブラリ
- ビルトイン (22)
検索結果
先頭2件
-
IO
. write(path , string , **opts) -> Integer (113.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...ができます。
詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is li......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... -
IO
. write(path , string , offset=nil , **opts) -> Integer (113.0) -
path で指定されるファイルを開き、string を書き込み、 閉じます。
...ができます。
詳しくは IO.open を見てください。
@param path ファイル名文字列
@param string 書き込む文字列
@param offset 書き込み開始位置
@param opts ファイルを開くときのキーワード引数
//emlist[例][ruby]{
text = "This is line one\nThis is li......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...