summaryrefslogtreecommitdiff
path: root/cli/js/ops/fs/real_path.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/ops/fs/real_path.ts')
-rw-r--r--cli/js/ops/fs/real_path.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/js/ops/fs/real_path.ts b/cli/js/ops/fs/real_path.ts
new file mode 100644
index 000000000..ab95b9583
--- /dev/null
+++ b/cli/js/ops/fs/real_path.ts
@@ -0,0 +1,10 @@
+// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
+import { sendSync, sendAsync } from "../dispatch_json.ts";
+
+export function realPathSync(path: string): string {
+ return sendSync("op_realpath", { path });
+}
+
+export function realPath(path: string): Promise<string> {
+ return sendAsync("op_realpath", { path });
+}