diff options
Diffstat (limited to 'cli/js/copy_file.ts')
-rw-r--r-- | cli/js/copy_file.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/copy_file.ts b/cli/js/copy_file.ts index 538a7a0ba..8ab013aab 100644 --- a/cli/js/copy_file.ts +++ b/cli/js/copy_file.ts @@ -1,6 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { sendSync, sendAsync } from "./dispatch_json.ts"; -import * as dispatch from "./dispatch.ts"; /** Copies the contents of a file to another by name synchronously. * Creates a new file if target does not exists, and if target exists, @@ -12,7 +11,7 @@ import * as dispatch from "./dispatch.ts"; * Deno.copyFileSync("from.txt", "to.txt"); */ export function copyFileSync(from: string, to: string): void { - sendSync(dispatch.OP_COPY_FILE, { from, to }); + sendSync("op_copy_file", { from, to }); } /** Copies the contents of a file to another by name. @@ -26,5 +25,5 @@ export function copyFileSync(from: string, to: string): void { * await Deno.copyFile("from.txt", "to.txt"); */ export async function copyFile(from: string, to: string): Promise<void> { - await sendAsync(dispatch.OP_COPY_FILE, { from, to }); + await sendAsync("op_copy_file", { from, to }); } |