deno / 1.23.2 / ~ / deno.createsync.html /

Deno.createSync

Creates a file if none exists or truncates an existing file and returns an instance of Deno.FsFile.

const file = Deno.createSync("/foo/bar.txt");

Requires allow-read and allow-write permissions.

function createSync( path: string | URL) : FsFile;
createSync( path: string | URL) : FsFile

Parameters

path: string | URL

Return Type

© 2018–2022 the Deno authors
https://doc.deno.land/deno/stable/~/Deno.createSync