Tcl Source Code

Check-in [f1c04ac99a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: Added docs for public funcs: Tcl_GetCwd & Tcl_Chdir
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | core-8-1-branch-old
Files: files | file ages | folders
SHA1: f1c04ac99a5687b53e2b16af7acf5975a56dac02
User & Date: rjohnson 1999-04-06 02:48:31.000
Context
1999-04-06
02:56
Fixed bug in man page. check-in: 05fe29e796 user: rjohnson tags: core-8-1-branch-old
02:48
Added docs for public funcs: Tcl_GetCwd & Tcl_Chdir check-in: f1c04ac99a user: rjohnson tags: core-8-1-branch-old
02:05
* tests/io.test: Minor test cleanup.

* generic/tclEncoding.c (Tcl_CreateEncoding): Minor lint to ma... check-in: 5eb05485f4 user: stanton tags: core-8-1-branch-old

Changes
Unified Diff Ignore Whitespace Patch
Added doc/GetCwd.3.


































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
'\"
'\" Copyright (c) 1998-1999 Scriptics Corportation
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @(#) $Id: GetCwd.3,v 1.1.2.1 1999/04/06 02:48:31 rjohnson Exp $
'\" 
.so man.macros
.TH Tcl_GetCwd 3 8.1 Tcl "Tcl Library Procedures"
.BS
.SH NAME
Tcl_GetCwd, Tcl_Chdir \- manipulate the current working directory
.SH SYNOPSIS
.nf
\fB#include <tcl.h>\fR
.sp
char *
\fBTcl_GetCwd\fR(\fIinterp\fR, \fIbufferPtr\fR)
.sp
int
\fBTcl_Chdir\fR(\fIpath\fR)
.SH ARGUMENTS
.AS Tcl_DString *bufferPtr
.AP Tcl_Interp *interp in
Interpreter in which to report an error, if any.
.AP char *path in
File path in UTF\-8 format.
.BE

.SH DESCRIPTION
.PP
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 \fBpwd\fR command.
.PP
\fBTcl_GetCwd\fR 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 \fBTcl_DStringFree()\fR when the result is no longer needed.
The format of the path is UTF\-8.
.PP
\fBTcl_Chdir\fR changes the applications current working directory to
the value specified in \fIpath\fR.  The format of the passed in string
must be UTF\-8.  The function returns -1 on error or 0 on success.

.SH KEYWORDS
pwd