method
realpath
v2_4_6 -
Show latest stable
- Class:
Pathname
realpath(p1 = v1)public
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.
1Note
Will raise error on broken symlink
This method will raise Errno::ENOENT on a broken symlink. You should probably rescue it every time you call this method.