diff options
Diffstat (limited to 'runtime/js/40_write_file.js')
-rw-r--r-- | runtime/js/40_write_file.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/js/40_write_file.js b/runtime/js/40_write_file.js index 462d71266..893b8b2c3 100644 --- a/runtime/js/40_write_file.js +++ b/runtime/js/40_write_file.js @@ -2,6 +2,7 @@ "use strict"; ((window) => { const core = window.__bootstrap.core; + const ops = core.ops; const { abortSignal } = window.__bootstrap; const { pathFromURL } = window.__bootstrap.util; @@ -11,7 +12,7 @@ options = {}, ) { options.signal?.throwIfAborted(); - core.opSync("op_write_file_sync", { + ops.op_write_file_sync({ path: pathFromURL(path), data, mode: options.mode, @@ -29,7 +30,7 @@ let abortHandler; if (options.signal) { options.signal.throwIfAborted(); - cancelRid = core.opSync("op_cancel_handle"); + cancelRid = ops.op_cancel_handle(); abortHandler = () => core.tryClose(cancelRid); options.signal[abortSignal.add](abortHandler); } |