path -> String[permalink][rdoc]to_path -> String-
オープン時に使用したパスを文字列で返します。
File.new("testfile").path #=> "testfile" File.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx"
このマニュアルは既にメンテナンスが終了したバージョンの Ruby を対象としています。 最新版のマニュアルへ
path -> String[permalink][rdoc]to_path -> Stringオープン時に使用したパスを文字列で返します。
File.new("testfile").path #=> "testfile"
File.new("/tmp/../tmp/xxx", "w").path #=> "/tmp/../tmp/xxx"