UCE Docs / cwd_set

Signature

void cwd_set(String path)

Parameters

path : the new working directory

Sets the host worker process current directory. In wasm this is a hostcall, so restore the previous directory when using it inside request code.

Example

String old = cwd_get();
cwd_set("/tmp");
print("cwd is now ", cwd_get(), "\n");
cwd_set(old);
Output
cwd is now /tmp