diff options
Diffstat (limited to 'cli/js/read_file.ts')
-rw-r--r-- | cli/js/read_file.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/read_file.ts b/cli/js/read_file.ts index 31b0348e6..43372ca45 100644 --- a/cli/js/read_file.ts +++ b/cli/js/read_file.ts @@ -9,8 +9,8 @@ import { readAll, readAllSync } from "./buffer.ts"; * console.log(decoder.decode(data)); * * Requires `allow-read` permission. */ -export function readFileSync(filename: string): Uint8Array { - const file = openSync(filename); +export function readFileSync(path: string): Uint8Array { + const file = openSync(path); const contents = readAllSync(file); file.close(); return contents; @@ -23,8 +23,8 @@ export function readFileSync(filename: string): Uint8Array { * console.log(decoder.decode(data)); * * Requires `allow-read` permission. */ -export async function readFile(filename: string): Promise<Uint8Array> { - const file = await open(filename); +export async function readFile(path: string): Promise<Uint8Array> { + const file = await open(path); const contents = await readAll(file); file.close(); return contents; |