Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/GetCwd.3 @ 25

Last change on this file since 25 was 25, checked in by landauf, 16 years ago

added tcl to libs

File size: 1.8 KB
Line 
1'\"
2'\" Copyright (c) 1998-1999 Scriptics Corporation
3'\"
4'\" See the file "license.terms" for information on usage and redistribution
5'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6'\"
7'\" RCS: @(#) $Id: GetCwd.3,v 1.9 2007/12/13 15:22:31 dgp Exp $
8'\"
9.so man.macros
10.TH Tcl_GetCwd 3 8.1 Tcl "Tcl Library Procedures"
11.BS
12.SH NAME
13Tcl_GetCwd, Tcl_Chdir \- manipulate the current working directory
14.SH SYNOPSIS
15.nf
16\fB#include <tcl.h>\fR
17.sp
18char *
19\fBTcl_GetCwd\fR(\fIinterp\fR, \fIbufferPtr\fR)
20.sp
21int
22\fBTcl_Chdir\fR(\fIpath\fR)
23.SH ARGUMENTS
24.AS Tcl_DString *bufferPtr in/out
25.AP Tcl_Interp *interp in
26Interpreter in which to report an error, if any.
27.AP Tcl_DString *bufferPtr in/out
28This dynamic string is used to store the current working directory.
29At the time of the call it should be uninitialized or free.  The
30caller must eventually call \fBTcl_DStringFree\fR to free up
31anything stored here.
32.AP char *path in
33File path in UTF\-8 format.
34.BE
35
36.SH DESCRIPTION
37.PP
38These procedures may be used to manipulate the current working
39directory for the application.  They provide C\-level access to
40the same functionality as the Tcl \fBpwd\fR command.
41.PP
42\fBTcl_GetCwd\fR returns a pointer to a string specifying the current
43directory, or NULL if the current directory could not be determined.
44If NULL is returned, an error message is left in the \fIinterp\fR's result.
45Storage for the result string is allocated in bufferPtr; the caller
46must call \fBTcl_DStringFree()\fR when the result is no longer needed.
47The format of the path is UTF\-8.
48.PP
49\fBTcl_Chdir\fR changes the applications current working directory to
50the value specified in \fIpath\fR.  The format of the passed in string
51must be UTF\-8.  The function returns -1 on error or 0 on success.
52
53.SH KEYWORDS
54pwd
Note: See TracBrowser for help on using the repository browser.