Skip to main content
Module

x/netzo/deno.d.ts>Deno.open

SDK for Netzo, the open Web platform to unify IoT devices, applications and services.
Go to Latest
function Deno.open
allow-read
allow-write
import { Deno } from "https://deno.land/x/netzo@v0.1.10/deno.d.ts";
const { open } = Deno;

Open a file and resolve to 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 = await Deno.open("/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.

Parameters

path: string | URL
optional
options: OpenOptions

Returns

Promise<FsFile>