make camel case readDir, readLink, realPath (#4995)

This commit is contained in:
Ryan Dahl 2020-04-29 16:39:37 -04:00 committed by GitHub
parent 78e0ae643c
commit bc792c0267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 80 additions and 80 deletions

View file

@ -16,11 +16,11 @@ function res(response: ReadDirResponse): DirEntry[] {
return response.entries;
}
export function readdirSync(path: string): Iterable<DirEntry> {
export function readDirSync(path: string): Iterable<DirEntry> {
return res(sendSync("op_read_dir", { path }))[Symbol.iterator]();
}
export function readdir(path: string): AsyncIterable<DirEntry> {
export function readDir(path: string): AsyncIterable<DirEntry> {
const array = sendAsync("op_read_dir", { path }).then(res);
return {
async *[Symbol.asyncIterator](): AsyncIterableIterator<DirEntry> {

View file

@ -1,10 +1,10 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
export function readlinkSync(path: string): string {
export function readLinkSync(path: string): string {
return sendSync("op_read_link", { path });
}
export function readlink(path: string): Promise<string> {
export function readLink(path: string): Promise<string> {
return sendAsync("op_read_link", { path });
}

View file

@ -1,10 +1,10 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
import { sendSync, sendAsync } from "../dispatch_json.ts";
export function realpathSync(path: string): string {
export function realPathSync(path: string): string {
return sendSync("op_realpath", { path });
}
export function realpath(path: string): Promise<string> {
export function realPath(path: string): Promise<string> {
return sendAsync("op_realpath", { path });
}