るりまサーチ

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

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. pathname expand_path

ライブラリ

クラス

検索結果

File#to_path -> String (21340.0)

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

...る場合です。

@
raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "...
.../tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

File#path -> String (18240.0)

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

...る場合です。

@
raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "...
.../tmp/../tmp/xxx"
File.open("/tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...