summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/read_link.ts
blob: 3c74e1f2e903a33167e94abaced04b99fd7b8548 (plain)
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";

export function readlinkSync(path: string): string {
  return sendSync("op_read_link", { path });
}

export async function readlink(path: string): Promise<string> {
  return await sendAsync("op_read_link", { path });
}