diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-04-29 16:39:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 16:39:37 -0400 |
commit | bc792c02674cc22459a3016b271f9c5b70e9d573 (patch) | |
tree | 44636cedddd7d55638733db018b04bf18f22e812 /std/fs/empty_dir.ts | |
parent | 78e0ae643c8eb9817b3396cf07a263ce9f03fc4c (diff) |
make camel case readDir, readLink, realPath (#4995)
Diffstat (limited to 'std/fs/empty_dir.ts')
-rw-r--r-- | std/fs/empty_dir.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/fs/empty_dir.ts b/std/fs/empty_dir.ts index 5e860c65f..8c3083cee 100644 --- a/std/fs/empty_dir.ts +++ b/std/fs/empty_dir.ts @@ -1,6 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { join } from "../path/mod.ts"; -const { readdir, readdirSync, mkdir, mkdirSync, remove, removeSync } = Deno; +const { readDir, readDirSync, mkdir, mkdirSync, remove, removeSync } = Deno; /** * Ensures that a directory is empty. * Deletes directory contents if the directory is not empty. @@ -11,7 +11,7 @@ const { readdir, readdirSync, mkdir, mkdirSync, remove, removeSync } = Deno; export async function emptyDir(dir: string): Promise<void> { try { const items = []; - for await (const dirEntry of readdir(dir)) { + for await (const dirEntry of readDir(dir)) { items.push(dirEntry); } @@ -41,7 +41,7 @@ export async function emptyDir(dir: string): Promise<void> { */ export function emptyDirSync(dir: string): void { try { - const items = [...readdirSync(dir)]; + const items = [...readDirSync(dir)]; // if directory already exist. then remove it's child item. while (items.length) { |