getcwd

public func getcwd() -> String

Returns the calling process's current working directory.

Wraps getcwd(2) with a 1 KiB buffer. Returns the empty string if the cwd has been deleted, is longer than 1 KiB, or any other getcwd failure occurs — the function does not surface the error code.

Examples

let here = getcwd();

Defined in lang/std/os/fs.ks