1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
denoland-deno/cli/js/ops/fs/symlink.ts
Ryan Dahl e0ca60e770
BREAKING: Use LLVM target triple for Deno.build (#4948)
Deno.build.os values have changed to correspond to standard LLVM target triples
"win" -> "windows"
"mac" -> "darwin"
2020-04-28 12:35:23 -04:00

26 lines
675 B
TypeScript

// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
import * as util from "../../util.ts";
import { build } from "../../build.ts";
export function symlinkSync(
oldpath: string,
newpath: string,
type?: string
): void {
if (build.os === "windows" && type) {
return util.notImplemented();
}
sendSync("op_symlink", { oldpath, newpath });
}
export async function symlink(
oldpath: string,
newpath: string,
type?: string
): Promise<void> {
if (build.os === "windows" && type) {
return util.notImplemented();
}
await sendAsync("op_symlink", { oldpath, newpath });
}