From bc792c02674cc22459a3016b271f9c5b70e9d573 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 29 Apr 2020 16:39:37 -0400 Subject: make camel case readDir, readLink, realPath (#4995) --- std/http/file_server.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'std/http/file_server.ts') diff --git a/std/http/file_server.ts b/std/http/file_server.ts index c225dbef1..d847642d9 100755 --- a/std/http/file_server.ts +++ b/std/http/file_server.ts @@ -6,7 +6,7 @@ // TODO Add tests like these: // https://github.com/indexzero/http-server/blob/master/test/http-server-test.js -const { args, stat, readdir, open, exit } = Deno; +const { args, stat, readDir, open, exit } = Deno; import { posix, extname } from "../path/mod.ts"; import { listenAndServe, ServerRequest, Response } from "./server.ts"; import { parse } from "../flags/mod.ts"; @@ -133,14 +133,14 @@ export async function serveFile( }; } -// TODO: simplify this after deno.stat and deno.readdir are fixed +// TODO: simplify this after deno.stat and deno.readDir are fixed async function serveDir( req: ServerRequest, dirPath: string ): Promise { const dirUrl = `/${posix.relative(target, dirPath)}`; const listEntry: EntryInfo[] = []; - for await (const entry of readdir(dirPath)) { + for await (const entry of readDir(dirPath)) { const filePath = posix.join(dirPath, entry.name); const fileUrl = posix.join(dirUrl, entry.name); if (entry.name === "index.html" && entry.isFile) { -- cgit v1.2.3