path<string> | <Buffer> | <URL>
options<string> | <Object>
Asynchronously computes the canonical pathname by resolving
A canonical pathname is not necessarily unique. Hard links and bind mounts can expose a file system entity through many pathnames.
This function behaves like
realpath(3), with some exceptions:
No case conversion is performed on case-insensitive file systems.
The maximum number of symbolic links is platform-independent and generally (much) higher than what the native
callback gets two arguments
(err, resolvedPath). May use
to resolve relative paths.
Only paths that can be converted to UTF8 strings are supported.
options argument can be a string specifying an encoding, or an
object with an
encoding property specifying the character encoding to use for
the path passed to the callback. If the
encoding is set to
the path returned will be passed as a <Buffer> object.
path resolves to a socket or a pipe, the function will return a system
dependent name for that object.