Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Deno.openSync

Synchronously open a file and return an instance of Deno.FsFile. The file does not need to previously exist if using the create or createNew open options. It is the callers responsibility to close the file when finished with it.

const file = Deno.openSync("/foo/bar.txt", { read: true, write: true });
// Do work with file
Deno.close(file.rid);

Requires allow-read and/or allow-write permissions depending on options.

function openSync(path: string | URL, options?: OpenOptions): FsFile;
§
openSync(path: string | URL, options?: OpenOptions): FsFile
[src]

§Parameters

§
path: string | URL
[src]
§
options?: OpenOptions optional
[src]

§Return Type