summaryrefslogtreecommitdiff
path: root/cli/js/files.ts
diff options
context:
space:
mode:
authorRiver <22485304+actual-size@users.noreply.github.com>2020-06-12 02:36:20 +1000
committerGitHub <noreply@github.com>2020-06-11 12:36:20 -0400
commit818a8010928cb8cef0b7043bd881c8cdce9b6efc (patch)
tree1502e74c9eb01901df8da118257d60d4f962b0e4 /cli/js/files.ts
parent813210d4337bf6e174f1da1f1a6c6fb9b073afa2 (diff)
feat: URL support in Deno filesystem methods (#5990)
Diffstat (limited to 'cli/js/files.ts')
-rw-r--r--cli/js/files.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/cli/js/files.ts b/cli/js/files.ts
index d6df8bad0..83922627a 100644
--- a/cli/js/files.ts
+++ b/cli/js/files.ts
@@ -21,7 +21,7 @@ import {
export { OpenOptions } from "./ops/fs/open.ts";
export function openSync(
- path: string,
+ path: string | URL,
options: OpenOptions = { read: true }
): File {
checkOpenOptions(options);
@@ -30,7 +30,7 @@ export function openSync(
}
export async function open(
- path: string,
+ path: string | URL,
options: OpenOptions = { read: true }
): Promise<File> {
checkOpenOptions(options);
@@ -38,7 +38,7 @@ export async function open(
return new File(rid);
}
-export function createSync(path: string): File {
+export function createSync(path: string | URL): File {
return openSync(path, {
read: true,
write: true,
@@ -47,7 +47,7 @@ export function createSync(path: string): File {
});
}
-export function create(path: string): Promise<File> {
+export function create(path: string | URL): Promise<File> {
return open(path, {
read: true,
write: true,