absolute_path

File.absolute_path(file_name [, dir_string] ) â abs_file_name
Class Public methods

Converts a pathname to an absolute pathname. Relative paths are referenced from the current working directory of the process unless dir_string is given, in which case it will be used as the starting point. If the given pathname starts with a â~'' it is NOT expanded, it is treated as a normal directory name.

File.absolute_path("~oracle/bin")       #=> "<relative_path>/~oracle/bin"
doc_ruby_on_rails
2015-04-06 09:13:05
Comments
Leave a Comment

Please login to continue.