summaryrefslogtreecommitdiff
path: root/cli/js/mkdir.ts
diff options
context:
space:
mode:
authordubiousjim <dubiousjim@gmail.com>2020-03-02 15:24:42 -0500
committerGitHub <noreply@github.com>2020-03-02 21:24:42 +0100
commita3c3a56ff71c325ea4807548484023c95ffdcd77 (patch)
treeb86091ab954429ed538222957c08588aa3718a97 /cli/js/mkdir.ts
parentff5bba3be833b0062b3991b96272c0047c18b62e (diff)
Rename Option -> Options (#4226)
* Rename MkdirOption interface to MkdirOptions It was hard to remember which Options interfaces were spelled in the singular and which in the plural (and anyway this one contained two options). Also added MkdirOptions to cli/js/deno.ts. All the analogous interfaces were exported there. * Rename RemoveOption interface to RemoveOptions This was the last remaining Option interface spelled in the singular. Easier to remember if they're all Option**s**; plus we may want to add extra options here later.
Diffstat (limited to 'cli/js/mkdir.ts')
-rw-r--r--cli/js/mkdir.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/mkdir.ts b/cli/js/mkdir.ts
index ecb15a9c5..4d15d9a44 100644
--- a/cli/js/mkdir.ts
+++ b/cli/js/mkdir.ts
@@ -5,7 +5,7 @@ import { sendSync, sendAsync } from "./dispatch_json.ts";
// mkdir and mkdirSync.
function mkdirArgs(
path: string,
- optionsOrRecursive?: MkdirOption | boolean,
+ optionsOrRecursive?: MkdirOptions | boolean,
mode?: number
): { path: string; recursive: boolean; mode: number } {
const args = { path, recursive: false, mode: 0o777 };
@@ -25,7 +25,7 @@ function mkdirArgs(
return args;
}
-export interface MkdirOption {
+export interface MkdirOptions {
/** Defaults to `false`. If set to `true`, means that any intermediate
* directories will also be created (as with the shell command `mkdir -p`).
* Intermediate directories are created with the same permissions.
@@ -46,7 +46,7 @@ export interface MkdirOption {
* Requires `allow-write` permission. */
export function mkdirSync(
path: string,
- optionsOrRecursive?: MkdirOption | boolean,
+ optionsOrRecursive?: MkdirOptions | boolean,
mode?: number
): void {
sendSync("op_mkdir", mkdirArgs(path, optionsOrRecursive, mode));
@@ -60,7 +60,7 @@ export function mkdirSync(
* Requires `allow-write` permission. */
export async function mkdir(
path: string,
- optionsOrRecursive?: MkdirOption | boolean,
+ optionsOrRecursive?: MkdirOptions | boolean,
mode?: number
): Promise<void> {
await sendAsync("op_mkdir", mkdirArgs(path, optionsOrRecursive, mode));