NAME
TclGetCwd, TclChdir - manipulate the current working directory
SYNOPSIS
##iinncclluuddee <
char * TTccllGGeettCCwwdd(interp, bufferPtr) int TTccllCChhddiirr(path) AARRGGUUMMEENNTTSS TclInterp *interp (in) Interpreter in which to report an error, if any. TclDString *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 callTTccllDDSSttrriinnggFFrreeee to free up any-
thing stored here.char *path (in) File path in UTF-8 format.
DESCRIPTION
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 ppwwdd command.TTccllGGeettCCwwdd 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 TTccllDDSSttrriinnggFFrreeee(()) when the result is no longer needed. Theformat of the path is UTF-8.
TTccllCChhddiirr changes the applications current working directory to the value specified in path. The format of the passed in string must beUTF-8. The function returns -1 on error or 0 on success.
KKEEYYWWOORRDDSS pwd Tcl 8.1 TclGetCwd(3)