std.fs.readlink

std.fs

readlink(pathname) -> target, err

Read the target of a symbolic link

Returns the raw link target exactly as stored (does not resolve further symlinks or relative paths). Wraps readlink(2). Returns nil and an error string if path is not a symlink or cannot be read.