FreeBSD Manual Pages
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(dirName) ARGUMENTS Tcl_Interp *interp (in) Interpreter in which to report an er- ror, if any. Tcl_DString *bufferPtr (in/out) This dynamic string is used to store the current working directory. At the time of the call it should be unini- tialized or free. The caller must eventually call Tcl_DStringFree to free up anything stored here. const char *dirName (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 re- turned, 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 dirName. 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)
NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | KEYWORDS
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=Tcl_GetCwd.tcl86&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>
