readLink
Reads the target of a symbolic link.
Example
ts
import { SF } from "@duplojs/server-utils";
const target = await SF.readLink("/tmp/link");
// target: E.Success<string> | SF.FileSystemLeft
const other = await SF.readLink("/tmp/other-link");Syntax
typescript
function readLink(
path: string | URL
): Promise<FileSystemLeft | E.Success<string>>Parameters
path: path of the link.
Return value
E.Success<string>: link target path.FileSystemLeft: if the read fails.
See also
symlink- Creates a symbolic link.
