るりまサーチ

最速Rubyリファレンスマニュアル検索!
54件ヒット [1-54件を表示] (0.106秒)

別のキーワード

  1. openssl p
  2. openssl p=
  3. fileutils mkdir_p
  4. dsa p
  5. rsa p

ライブラリ

キーワード

検索結果

IO#path -> String | nil (24246.0)

IO に関連付けられたパスを返します。IO がパスに関連付けられていない場合は nil を返します。

...
IO
に関連付けられたパスを返します。IO がパスに関連付けられていない場合は nil を返します。

このメソッドが返すパスがファイルシステム上に存在することは保証されていません。

//emlist[例][ruby]{
p
STDIN.path...
...# => "<STDIN>"
p
IO.new(IO.sysopen("/")).path # => "/"
p
IO.new(IO.sysopen("/"), path: "foo").path # => "foo"
//}...

IO#to_path -> String | nil (12246.0)

IO に関連付けられたパスを返します。IO がパスに関連付けられていない場合は nil を返します。

...
IO
に関連付けられたパスを返します。IO がパスに関連付けられていない場合は nil を返します。

このメソッドが返すパスがファイルシステム上に存在することは保証されていません。

//emlist[例][ruby]{
p
STDIN.path...
...# => "<STDIN>"
p
IO.new(IO.sysopen("/")).path # => "/"
p
IO.new(IO.sysopen("/"), path: "foo").path # => "foo"
//}...

IO#pathconf(name) -> Integer | nil (12208.0)

fpathconf(3) で取得したファイルの設定変数の値を返します。

...fpathconf(3) で取得したファイルの設定変数の値を返します。

引数 name が制限に関する設定値であり、設定が制限がない状態の場合は nil
を返します。(fpathconf(3) が -1 を返し、errno が設定されていない
場合)

@param name Etc モジ...
...ュールの PC_ で始まる定数のいずれかを指定します。

//emlist[][ruby]{
require 'etc'
IO
.pipe {|r, w|
p
w.pathconf(Etc::PC_PIPE_BUF) # => 4096
}
//}...

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

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

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

第二引数を省略したとき self のモードをそのまま引き継ぎます。
IO
#pos, IO#lineno などはリセットされます。

@param path パスを表す文字列を指定します。

@param mode パ...
...

//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 (6226.0)

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

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

第二引数を省略したとき self のモードをそのまま引き継ぎます。
IO
#pos, IO#lineno などはリセットされます。

@param path パスを表す文字列を指定します。

@param mode パ...
...

//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(io) -> self (6106.0)

自身を指定された io に繋ぎ換えます。

... io に繋ぎ換えます。

クラスも io に等しくなることに注意してください。
IO
#pos, IO#lineno などは指定された io と等しくなります。

@param io 自身を繋ぎ換えたい IO オブジェクトを指定します。

@raise IOError 指定された io が c...