るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. context prompt_n
  3. pop n_mails
  4. openssl n
  5. rsa n=

ライブラリ

クラス

検索結果

File#path -> String (18227.0)

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

...り、
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 } #=> "/tmp"
//}...
...PFILE 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", Fi...
...le::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

File#to_path -> String (6227.0)

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

...り、
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 } #=> "/tmp"
//}...
...PFILE 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", Fi...
...le::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...