diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-10-03 21:18:23 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-10-04 00:25:55 -0400 |
commit | 818ad37678e478039a9eccf543e1049fcdf32566 (patch) | |
tree | 2f97738e66c8c0b25d7fb2caa32dcec4d4d644c4 /js/read_dir.ts | |
parent | f774953011cb3ad85914bc9f5f66aa121f00528d (diff) |
Rename fbs to msg.
Diffstat (limited to 'js/read_dir.ts')
-rw-r--r-- | js/read_dir.ts | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/js/read_dir.ts b/js/read_dir.ts index 591db7ee5..b1977549d 100644 --- a/js/read_dir.ts +++ b/js/read_dir.ts @@ -1,5 +1,5 @@ // Copyright 2018 the Deno authors. All rights reserved. MIT license. -import * as fbs from "gen/msg_generated"; +import * as msg from "gen/msg_generated"; import { flatbuffers } from "flatbuffers"; import * as dispatch from "./dispatch"; import { FileInfo, FileInfoImpl } from "./fileinfo"; @@ -27,19 +27,19 @@ export async function readDir(path: string): Promise<FileInfo[]> { return res(await dispatch.sendAsync(...req(path))); } -function req(path: string): [flatbuffers.Builder, fbs.Any, flatbuffers.Offset] { +function req(path: string): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] { const builder = new flatbuffers.Builder(); const path_ = builder.createString(path); - fbs.ReadDir.startReadDir(builder); - fbs.ReadDir.addPath(builder, path_); - const inner = fbs.ReadDir.endReadDir(builder); - return [builder, fbs.Any.ReadDir, inner]; + msg.ReadDir.startReadDir(builder); + msg.ReadDir.addPath(builder, path_); + const inner = msg.ReadDir.endReadDir(builder); + return [builder, msg.Any.ReadDir, inner]; } -function res(baseRes: null | fbs.Base): FileInfo[] { +function res(baseRes: null | msg.Base): FileInfo[] { assert(baseRes != null); - assert(fbs.Any.ReadDirRes === baseRes!.innerType()); - const res = new fbs.ReadDirRes(); + assert(msg.Any.ReadDirRes === baseRes!.innerType()); + const res = new msg.ReadDirRes(); assert(baseRes!.inner(res) != null); const fileInfos: FileInfo[] = []; for (let i = 0; i < res.entriesLength(); i++) { |