summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/symlink.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/symlink.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/symlink.ts')
-rw-r--r--cli/js/ops/fs/symlink.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/js/ops/fs/symlink.ts b/cli/js/ops/fs/symlink.ts
index ad49bfdd7..4f9c85f7b 100644
--- a/cli/js/ops/fs/symlink.ts
+++ b/cli/js/ops/fs/symlink.ts
@@ -4,23 +4,23 @@ import * as util from "../../util.ts";
import { build } from "../../build.ts";
export function symlinkSync(
- oldname: string,
- newname: string,
+ oldpath: string,
+ newpath: string,
type?: string
): void {
if (build.os === "win" && type) {
return util.notImplemented();
}
- sendSync("op_symlink", { oldname, newname });
+ sendSync("op_symlink", { oldpath, newpath });
}
export async function symlink(
- oldname: string,
- newname: string,
+ oldpath: string,
+ newpath: string,
type?: string
): Promise<void> {
if (build.os === "win" && type) {
return util.notImplemented();
}
- await sendAsync("op_symlink", { oldname, newname });
+ await sendAsync("op_symlink", { oldpath, newpath });
}