Skip to main content

Mojo function

cwd

cwd() -> Path

Gets the current directory.

Example:

from pathlib import cwd

var string_path = cwd()
print(string_path)

Returns:

Path: The current directory.

Raises:

If the operation fails.

Was this page helpful?