Skip to content
class method

File.readlink

(::string | ::_ToPath link_name) -> ::String
File.readlink(link_name) → file_name

Returns the name of the file referenced by the given link. Not available on all platforms.

Example
File.symlink("testfile", "link2test")   #=> 0
File.readlink("link2test")              #=> "testfile"
See also .readable_real? .realdirpath .readable? .realpath also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0