|
ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages
|
|
This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles. This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com. For more information about the manual page format, see the manual page for manpages(5). |
Tcl_GetCwd(3) Tcl Library Procedures Tcl_GetCwd(3)
____________________________________________________________________________________________________________
NAME
Tcl_GetCwd, Tcl_Chdir - manipulate the current working directory
SYNOPSIS
#include <tcl.h>
char *
Tcl_GetCwd(interp, bufferPtr)
int
Tcl_Chdir(path)
ARGUMENTS
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. directory.
tory. At the time of the call it should be uninitialized or
free. The caller must eventually call Tcl_DStringFree to free
up anything stored here.
char *path (in) File path in UTF-8 format.
____________________________________________________________________________________________________________
DESCRIPTION
These procedures may be used to manipulate the current working directory 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 directory, 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.
KEYWORDS
pwd
Tcl 8.1 Tcl_GetCwd(3)
|
|