Rename perm to mode (#4276)

There's a lot of variation in doc comments and internal code about
whether chmod/0o777-style permissions are called `mode` or `perm`. (For
example, mkdir and writeFile choose differently.)

Had proposed earlier to go consistently with `perm`, but on balance devs
prefer to go with `mode`.
This commit is contained in:
dubiousjim 2020-03-07 22:29:12 -05:00 committed by GitHub
parent 8d1ba3552f
commit 0dd131d4a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 52 additions and 51 deletions

View file

@ -10,7 +10,7 @@ function readFileString(filename: string): string {
function writeFileString(filename: string, s: string): void {
const enc = new TextEncoder();
const data = enc.encode(s);
Deno.writeFileSync(filename, data, { perm: 0o666 });
Deno.writeFileSync(filename, data, { mode: 0o666 });
}
function assertSameContent(filename1: string, filename2: string): void {