jeiea
jeiea
DDeno
Created by jeiea on 10/15/2023 in #help
Why Bad resource ID occurs?
I ran the following and got error: BadResource: Bad resource ID on seek.
import { toText } from "https://deno.land/std@0.204.0/streams/mod.ts";
const temp = await Deno.makeTempFile();
const file = await Deno.open(temp, { create: true, read: true, write: true });
await toText(file.readable);
await file.seek(0, Deno.SeekMode.Start);
import { toText } from "https://deno.land/std@0.204.0/streams/mod.ts";
const temp = await Deno.makeTempFile();
const file = await Deno.open(temp, { create: true, read: true, write: true });
await toText(file.readable);
await file.seek(0, Deno.SeekMode.Start);
3 replies