mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
make camel case readDir, readLink, realPath (#4995)
This commit is contained in:
parent
78e0ae643c
commit
bc792c0267
17 changed files with 80 additions and 80 deletions
|
@ -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> {
|
||||
|
|
|
@ -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 });
|
||||
}
|
||||
|
|
|
@ -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 });
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue