path 2

file.path â filename
Instance Public methods

Returns the pathname used to create file as a string. Does not normalize the name.

1
2
File.new("testfile").path               #=> "testfile"
File.new("/tmp/../tmp/xxx", "w").path   #=> "/tmp/../tmp/xxx"
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.