diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-02-25 09:14:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 09:14:27 -0500 |
commit | 91b606aaae23bcb790b55adc5fe70a182a37d564 (patch) | |
tree | 16b56a21ffcb3991569eda984fbd14073bdbd3ae /cli/js/rename.ts | |
parent | 805992b14a65a6dbfb857dea6d9b657477de043d (diff) |
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/rename.ts')
-rw-r--r-- | cli/js/rename.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/rename.ts b/cli/js/rename.ts index 6c0b5d95d..a689061a2 100644 --- a/cli/js/rename.ts +++ b/cli/js/rename.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"; /** Synchronously renames (moves) `oldpath` to `newpath`. If `newpath` already * exists and is not a directory, `renameSync()` replaces it. OS-specific @@ -10,7 +9,7 @@ import * as dispatch from "./dispatch.ts"; * Deno.renameSync("old/path", "new/path"); */ export function renameSync(oldpath: string, newpath: string): void { - sendSync(dispatch.OP_RENAME, { oldpath, newpath }); + sendSync("op_rename", { oldpath, newpath }); } /** Renames (moves) `oldpath` to `newpath`. If `newpath` already exists and is @@ -20,5 +19,5 @@ export function renameSync(oldpath: string, newpath: string): void { * await Deno.rename("old/path", "new/path"); */ export async function rename(oldpath: string, newpath: string): Promise<void> { - await sendAsync(dispatch.OP_RENAME, { oldpath, newpath }); + await sendAsync("op_rename", { oldpath, newpath }); } |