How do I get the absolute path to a file, without following symlinks.
E.g.
/path/to/some/file
/path/to/some/link -> /path/to/some/file
/path/to/some/directory/
My current working directory is /path/to/some/directory/
and I go realpath('../link)
it returns /path/to/some/file
.
(I know realpath
is supposed to work this way)
Is there a function instead of realpath
that would return /path/to/some/link