Sun Java System Web Server 6.1 SP6 NSAPI Programmer's Guide


The util_chdir2path function changes the current directory to a specified directory, where you can access a file.

When running under Windows, use a critical section to ensure that more than one thread does not call this function at the same time.

Use util_chdir2path when you want to make file access a little quicker, because you do not need to use a full path.


int util_chdir2path(char *path);


0 if the directory was changed, or -1 if the directory could not be changed.


char *path is the name of a directory.

The parameter must be a writable string because it isn’t permanently modified.