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

x/xdg/vendor/types/deno.d.ts>Deno.cwd

Determine XDG Base Directory paths (OS/platform portable)
Go to Latest
function Deno.cwd
import { Deno } from "https://deno.land/x/xdg@v10.3.0/vendor/types/deno.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

Returns

string