Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/cli/js/lib.deno_runtime.d.ts>Deno.seek

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.seek
import { Deno } from "https://deno.land/x/deno@v0.28.0/cli/js/lib.deno_runtime.d.ts";
const { seek } = Deno;

Seek a file ID to the given offset under mode given by whence.

 (async () => {
   const file = await Deno.open("/foo/bar.txt");
   await Deno.seek(file.rid, 0, 0);
 })();

Parameters

rid: number
offset: number
whence: SeekMode

Returns

Promise<void>