Manual Pages for UNIX Darwin command on man Tcl_Chdir
MyWebUniversity

Manual Pages for UNIX Darwin command on man Tcl_Chdir

TclGetCwd(3) Tcl Library Procedures TclGetCwd(3)

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 call

TTccllDDSSttrriinnggFFrreeee 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. The

format 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 be

UTF-8. The function returns -1 on error or 0 on success.

KKEEYYWWOORRDDSS pwd Tcl 8.1 TclGetCwd(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™