Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/dts/lib.deno.ns.d.ts>Deno.cwd

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.cwd
allow-read
import { Deno } from "https://deno.land/x/deno@v1.28.1/cli/dts/lib.deno.ns.d.ts";
const { cwd } = Deno;

Return a string representing the current working directory.

If the current directory can be reached via multiple paths (due to symbolic links), cwd() may return any one of them.

const currentWorkingDirectory = Deno.cwd();

Throws Deno.errors.NotFound if directory not available.

Requires allow-read permission.

Returns

string