るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. _builtin to_s
  2. openssl to_der
  3. openssl to_s
  4. _builtin to_a
  5. openssl to_pem

クラス

検索結果

Dir#to_path -> String (45331.0)

オープンしているディレクトリのパス名を文字列で返します。

オープンしているディレクトリのパス名を文字列で返します。

//emlist[例][ruby]{
Dir.open("..") do |d|
d.path # => ".."
d.to_path # => ".."
end
//}

File#to_path -> String (45313.0)

オープン時に使用したパスを文字列で返します。

オープン時に使用したパスを文字列で返します。

パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたり、
File::Constants::TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/.....

Dir#path -> String (31.0)

オープンしているディレクトリのパス名を文字列で返します。

オープンしているディレクトリのパス名を文字列で返します。

//emlist[例][ruby]{
Dir.open("..") do |d|
d.path # => ".."
d.to_path # => ".."
end
//}

File#path -> String (13.0)

オープン時に使用したパスを文字列で返します。

オープン時に使用したパスを文字列で返します。

パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたり、
File::Constants::TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/.....