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/read_dir.ts | |
parent | 805992b14a65a6dbfb857dea6d9b657477de043d (diff) |
Clean up how we use opIds (#4118)
Diffstat (limited to 'cli/js/read_dir.ts')
-rw-r--r-- | cli/js/read_dir.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/js/read_dir.ts b/cli/js/read_dir.ts index ba6419032..948bad044 100644 --- a/cli/js/read_dir.ts +++ b/cli/js/read_dir.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"; import { FileInfo, FileInfoImpl } from "./file_info.ts"; import { StatResponse } from "./stat.ts"; @@ -22,7 +21,7 @@ function res(response: ReadDirResponse): FileInfo[] { * const files = Deno.readDirSync("/"); */ export function readDirSync(path: string): FileInfo[] { - return res(sendSync(dispatch.OP_READ_DIR, { path })); + return res(sendSync("op_read_dir", { path })); } /** Reads the directory given by path and returns a list of file info. @@ -30,5 +29,5 @@ export function readDirSync(path: string): FileInfo[] { * const files = await Deno.readDir("/"); */ export async function readDir(path: string): Promise<FileInfo[]> { - return res(await sendAsync(dispatch.OP_READ_DIR, { path })); + return res(await sendAsync("op_read_dir", { path })); } |