Sets the current working directory of the VM to the specified path context.
#include <fsio.h> int setcwd ( NXPathctx_t pathCtx);
(IN) Specifies a path context.
If successful, returns 0. Otherwise, returns -1 and sets errno to the following value:
You create a path context with the NXCreatePathContext function.
The setcwd function sets the current working directory for all threads running in the VM. To set the current working directory only for the current thread, use setcwd2.
The setcwd and setcwd2 functions allow you to inject an NKS path context with authenticated user credentials into the current working directory. Such credentials allow you to access resources:
On your current server (with a connection other than connection 0).
On remote servers.
To set up the current working directory so that you can access resources on a remote server:
Set up a path context to the remote server with NXCreatePathContext.
Set the current working directory to that path context with setcwd.
You can then use POSIX and ANSI functions to access files on that remote server.