Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
function Deno.cwd
allow-read

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