Skip to main content

pwd (function)​

Returns the process's current working directory.

Provides the same functionality as the shell builtin of the same name.

Example

const here = pwd();
console.log(here);
const pwd: {
(): Path;
readonly initial: Path;
};

pwd(...) (call signature)​

Returns the process's current working directory.

Provides the same functionality as the shell builtin of the same name.

Example

const readmePath = pwd().concat("README.md");
console.log(readmePath);
(): Path;

pwd.initial (readonly Path property)​

A frozen, read-only Path object containing what pwd() was when yavascript first started up.

Example

cd("src");
readonly initial: Path;