diff options
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 })); } |