summaryrefslogtreecommitdiff
path: root/js/read_dir.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/read_dir.ts')
-rw-r--r--js/read_dir.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/js/read_dir.ts b/js/read_dir.ts
index 1394c8514..13c620916 100644
--- a/js/read_dir.ts
+++ b/js/read_dir.ts
@@ -1,7 +1,5 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
-import * as msg from "gen/cli/msg_generated";
-import * as flatbuffers from "./flatbuffers";
-import * as dispatch from "./dispatch";
+import { sendSync, sendAsync, msg, flatbuffers } from "./dispatch_flatbuffers";
import { FileInfo, FileInfoImpl } from "./file_info";
import { assert } from "./util";
@@ -30,7 +28,7 @@ function res(baseRes: null | msg.Base): FileInfo[] {
* const files = Deno.readDirSync("/");
*/
export function readDirSync(path: string): FileInfo[] {
- return res(dispatch.sendSync(...req(path)));
+ return res(sendSync(...req(path)));
}
/** Reads the directory given by path and returns a list of file info.
@@ -38,5 +36,5 @@ export function readDirSync(path: string): FileInfo[] {
* const files = await Deno.readDir("/");
*/
export async function readDir(path: string): Promise<FileInfo[]> {
- return res(await dispatch.sendAsync(...req(path)));
+ return res(await sendAsync(...req(path)));
}