chdir

Changes the current working directory to the specified path name

Local Servers:blocking
Remote Servers:blocking
Classification:POSIX
Platform:NLM
Service:File System

Syntax

   #include <unistd.h>  
    
   int chdir  (  
      const char  *pathname);
   

Parameters

pathname

(IN) Specifies the buffer containing the directory path (can include a volume name).

Return Values

Returns a value of 0 if successful, nonzero otherwise. If an error occurs, errno and NetWareErrno are set.

Remarks

chdir causes all threads in the current thread group to have a new current working directory. The pathname parameter can be either relative to the current working directory or it can be an absolute path name.

The SetCurrentNameSpace function sets the name space which is used for parsing the path input to chdir.

NOTE:For NetWare versions before 4.x, chdir works with only the DOS name space for remote servers.

See Also

getcwd, mkdir, rmdir