るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.094秒)
トップページ > クエリ:self[x] > クエリ:t[x] > クエリ:@[x] > クエリ:path[x] > クエリ:readlines[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle type_size_t

ライブラリ

クラス

検索結果

Pathname#readlines(*args) -> [String] (24245.0)

IO.readlines(self.to_s, *args)と同じです。

...IO.readlines(self.to_s, *args)と同じです。


@
see IO.readlines...

IO#reopen(path) -> self (371.0)

path で指定されたファイルにストリームを繋ぎ換えます。

...
path
で指定されたファイルにストリームを繋ぎ換えます。

第二引数を省略したとき self のモードをそのまま引き継ぎます。
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 # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}

@
see Kernel.#open...

IO#reopen(path, mode) -> self (371.0)

path で指定されたファイルにストリームを繋ぎ換えます。

...
path
で指定されたファイルにストリームを繋ぎ換えます。

第二引数を省略したとき self のモードをそのまま引き継ぎます。
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 # => ["This is line one\n", "This is line two\n", "This is line three\n"]
f2.close
//}

@
see Kernel.#open...