summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_write.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_write.mjs')
-rw-r--r--ext/node/polyfills/_fs/_fs_write.mjs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs
index b4b133222..254094c9a 100644
--- a/ext/node/polyfills/_fs/_fs_write.mjs
+++ b/ext/node/polyfills/_fs/_fs_write.mjs
@@ -10,7 +10,6 @@ import {
validateInteger,
} from "ext:deno_node/internal/validators.mjs";
import * as io from "ext:deno_io/12_io.js";
-import * as fs from "ext:deno_fs/30_fs.js";
import {
arrayBufferViewToUint8Array,
getValidatedFd,
@@ -19,6 +18,7 @@ import {
} from "ext:deno_node/internal/fs/utils.mjs";
import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts";
import { maybeCallback } from "ext:deno_node/_fs/_fs_common.ts";
+import { op_fs_seek_async, op_fs_seek_sync } from "ext:core/ops";
export function writeSync(fd, buffer, offset, length, position) {
fd = getValidatedFd(fd);
@@ -26,7 +26,7 @@ export function writeSync(fd, buffer, offset, length, position) {
const innerWriteSync = (fd, buffer, offset, length, position) => {
buffer = arrayBufferViewToUint8Array(buffer);
if (typeof position === "number") {
- fs.seekSync(fd, position, io.SeekMode.Start);
+ op_fs_seek_sync(fd, position, io.SeekMode.Start);
}
let currentOffset = offset;
const end = offset + length;
@@ -70,7 +70,7 @@ export function write(fd, buffer, offset, length, position, callback) {
const innerWrite = async (fd, buffer, offset, length, position) => {
buffer = arrayBufferViewToUint8Array(buffer);
if (typeof position === "number") {
- await fs.seek(fd, position, io.SeekMode.Start);
+ await op_fs_seek_async(fd, position, io.SeekMode.Start);
}
let currentOffset = offset;
const end = offset + length;