summaryrefslogtreecommitdiff
path: root/cli/rt/30_files.js
diff options
context:
space:
mode:
Diffstat (limited to 'cli/rt/30_files.js')
-rw-r--r--cli/rt/30_files.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/cli/rt/30_files.js b/cli/rt/30_files.js
index c0a2bbbb6..ff6b85ae5 100644
--- a/cli/rt/30_files.js
+++ b/cli/rt/30_files.js
@@ -1,9 +1,9 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
((window) => {
+ const core = window.Deno.core;
const { close } = window.__bootstrap.resources;
const { read, readSync, write, writeSync } = window.__bootstrap.io;
- const { sendSync, sendAsync } = window.__bootstrap.dispatchJson;
const { pathFromURL } = window.__bootstrap.util;
function seekSync(
@@ -11,7 +11,7 @@
offset,
whence,
) {
- return sendSync("op_seek_sync", { rid, offset, whence });
+ return core.jsonOpSync("op_seek_sync", { rid, offset, whence });
}
function seek(
@@ -19,7 +19,7 @@
offset,
whence,
) {
- return sendAsync("op_seek_async", { rid, offset, whence });
+ return core.jsonOpAsync("op_seek_async", { rid, offset, whence });
}
function openSync(
@@ -28,7 +28,7 @@
) {
checkOpenOptions(options);
const mode = options?.mode;
- const rid = sendSync(
+ const rid = core.jsonOpSync(
"op_open_sync",
{ path: pathFromURL(path), options, mode },
);
@@ -42,7 +42,7 @@
) {
checkOpenOptions(options);
const mode = options?.mode;
- const rid = await sendAsync(
+ const rid = await core.jsonOpAsync(
"op_open_async",
{ path: pathFromURL(path), options, mode },
);