diff options
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"); } |