summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/link.ts
diff options
context:
space:
mode:
authordubiousjim <dubiousjim@gmail.com>2020-03-20 09:46:26 -0400
committerGitHub <noreply@github.com>2020-03-20 09:46:26 -0400
commit69303e21495a14a2c6709f96af364682a485ac21 (patch)
treeb2662cefde16afce58d6dc73e1c243fc9cefa18b /cli/js/ops/fs/link.ts
parent798904b0f2ed0c7284b67bba2f125f406b5850de (diff)
refactor: move code from fs.rs into ops/fs.rs (#4428)
This a complex boring PR that shifts around code (primarily) in cli/fs.rs and cli/ops/fs.rs. The gain of this refactoring is to ease the way for #4188 and #4017, and also to avoid some future development pain. Mostly there is no change in functionality. Except: * squashed bugs where op_utime and op_chown weren't using `resolve_from_cwd` * eliminated the use of the external `remove_dir_all` crate. * op_chmod now only queries metadata to verify file/dir exists on Windows (it will already fail on Unix if it doesn't) * op_chown now verifies the file/dir's existence on Windows like chmod does.
Diffstat (limited to 'cli/js/ops/fs/link.ts')
-rw-r--r--cli/js/ops/fs/link.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/ops/fs/link.ts b/cli/js/ops/fs/link.ts
index 24a874d47..92fb58834 100644
--- a/cli/js/ops/fs/link.ts
+++ b/cli/js/ops/fs/link.ts
@@ -1,10 +1,10 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
-export function linkSync(oldname: string, newname: string): void {
- sendSync("op_link", { oldname, newname });
+export function linkSync(oldpath: string, newpath: string): void {
+ sendSync("op_link", { oldpath, newpath });
}
-export async function link(oldname: string, newname: string): Promise<void> {
- await sendAsync("op_link", { oldname, newname });
+export async function link(oldpath: string, newpath: string): Promise<void> {
+ await sendAsync("op_link", { oldpath, newpath });
}