diff options
Diffstat (limited to 'cli/js/ops/fs/read_dir.ts')
-rw-r--r-- | cli/js/ops/fs/read_dir.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cli/js/ops/fs/read_dir.ts b/cli/js/ops/fs/read_dir.ts index 29b8676ef..7d65fed48 100644 --- a/cli/js/ops/fs/read_dir.ts +++ b/cli/js/ops/fs/read_dir.ts @@ -1,21 +1,19 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { sendSync, sendAsync } from "../dispatch_json.ts"; -import { FileInfo, StatResponse, parseFileInfo } from "./stat.ts"; -export interface DirEntry extends FileInfo { +export interface DirEntry { name: string; + isFile: boolean; + isDirectory: boolean; + isSymlink: boolean; } interface ReadDirResponse { - entries: StatResponse[]; + entries: DirEntry[]; } function res(response: ReadDirResponse): DirEntry[] { - return response.entries.map( - (statRes: StatResponse): DirEntry => { - return { ...parseFileInfo(statRes), name: statRes.name! }; - } - ); + return response.entries; } export function readdirSync(path: string): Iterable<DirEntry> { |