Tcl_Chdir man page on OpenDarwin

Man page or keyword search:  
man Server   3202 pages
apropos Keyword Search (all sections)
Output format
OpenDarwin logo
[printable version]

Tcl_GetCwd(3)		    Tcl Library Procedures		 Tcl_GetCwd(3)


       Tcl_GetCwd, Tcl_Chdir - manipulate the current working directory

       #include <tcl.h>

       char *
       Tcl_GetCwd(interp, bufferPtr)


       Tcl_Interp    *interp	  (in)	    Interpreter	 in which to report an
					    error, if any.

       Tcl_DString   *bufferPtr	  (in/out)  This dynamic  string  is  used  to
					    store  the	current working direc‐
					    tory.  At the time of the call  it
					    should  be	uninitialized or free.
					    The caller	must  eventually  call
					    Tcl_DStringFree  to	 free  up any‐
					    thing stored here.

       char	     *path	  (in)	    File path in UTF-8 format.

       These procedures may be used to manipulate the current  working	direc‐
       tory  for  the  application.   They  provide C-level access to the same
       functionality as the Tcl pwd command.

       Tcl_GetCwd returns a pointer to a string specifying the current	direc‐
       tory,  or  NULL	if  the current directory could not be determined.  If
       NULL is returned, an error message is  left  in	the  interp's  result.
       Storage	for  the  result  string is allocated in bufferPtr; the caller
       must call Tcl_DStringFree() when the result is no longer	 needed.   The
       format of the path is UTF-8.

       Tcl_Chdir  changes  the	applications  current working directory to the
       value specified in path.	 The format of the passed in  string  must  be
       UTF-8.  The function returns -1 on error or 0 on success.


Tcl				      8.1			 Tcl_GetCwd(3)

List of man pages available for OpenDarwin

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net