Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/deno/cli/js/files.ts>createSync

A modern runtime for JavaScript and TypeScript.
Go to Latest
function createSync
import { createSync } from "https://deno.land/x/deno@v0.30.0/cli/js/files.ts";

Creates a file if none exists or truncates an existing file and returns an instance of the File object synchronously.

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

Parameters

filename: string