diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-06-20 23:49:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-20 23:49:27 -0400 |
commit | 0a81ec6b1e00ef01900393ae0460eaf3a6ec05d6 (patch) | |
tree | 020b1d71aabd8102ae85ae24fc89becb035b4854 /cli/js/ops/os.ts | |
parent | c0ea9a99c0dc21faf46f73dca481361853e914fa (diff) |
Remove Deno.dir and dirs dependency (#6385)
Diffstat (limited to 'cli/js/ops/os.ts')
-rw-r--r-- | cli/js/ops/os.ts | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/cli/js/ops/os.ts b/cli/js/ops/os.ts index e63d8b358..696c9f10b 100644 --- a/cli/js/ops/os.ts +++ b/cli/js/ops/os.ts @@ -1,6 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import { sendSync } from "./dispatch_json.ts"; -import { errors } from "../errors.ts"; export function loadavg(): number[] { return sendSync("op_loadavg"); @@ -40,35 +39,6 @@ export const env = { delete: deleteEnv, }; -type DirKind = - | "home" - | "cache" - | "config" - | "executable" - | "data" - | "data_local" - | "audio" - | "desktop" - | "document" - | "download" - | "font" - | "picture" - | "public" - | "template" - | "tmp" - | "video"; - -export function dir(kind: DirKind): string | null { - try { - return sendSync("op_get_dir", { kind }); - } catch (error) { - if (error instanceof errors.PermissionDenied) { - throw error; - } - return null; - } -} - export function execPath(): string { return sendSync("op_exec_path"); } |