From bdc97b3976786bb744a27e59b0f4f28554a682df Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 21 Aug 2019 20:42:48 -0400 Subject: Organize dispatch a bit (#2796) Just some clean up reorganization around flatbuffer/minimal dispatch code. This is prep for adding a JSON dispatcher. --- js/mkdir.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'js/mkdir.ts') diff --git a/js/mkdir.ts b/js/mkdir.ts index bf13c0e28..417c754a9 100644 --- a/js/mkdir.ts +++ b/js/mkdir.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"; function req( path: string, @@ -24,7 +22,7 @@ function req( * Deno.mkdirSync("nested/directories", true); */ export function mkdirSync(path: string, recursive = false, mode = 0o777): void { - dispatch.sendSync(...req(path, recursive, mode)); + sendSync(...req(path, recursive, mode)); } /** Creates a new directory with the specified path. @@ -41,5 +39,5 @@ export async function mkdir( recursive = false, mode = 0o777 ): Promise { - await dispatch.sendAsync(...req(path, recursive, mode)); + await sendAsync(...req(path, recursive, mode)); } -- cgit v1.2.3