instance method
Pathname#realpath
(?::string | ::Pathname base_dir) -> ::Pathname
realpath(...)
pathname_builtin.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/pathname_builtin.rb, line 996
def realpath(...) self.class.new(File.realpath(@path, ...)) end
Returns the real (absolute) pathname for self in the actual filesystem.
Does not contain symlinks or useless dots, .. and ..
All components of the pathname must exist when this method is called.
See also
#realdirpath
#relative?
#readlink
#relative_path_from
also in
4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0