diff options
Diffstat (limited to 'doc/open.n')
-rw-r--r-- | doc/open.n | 23 |
1 files changed, 14 insertions, 9 deletions
@@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: open.n,v 1.23 2005/04/06 20:55:23 dkf Exp $ +'\" RCS: @(#) $Id: open.n,v 1.24 2005/04/27 18:48:24 dgp Exp $ '\" .so man.macros .TH open n 8.3 Tcl "Tcl Built-In Commands" @@ -61,6 +61,14 @@ Set the initial access position to the end of the file. Open the file for reading and writing. If the file doesn't exist, create a new empty file. Set the initial access position to the end of the file. +.VS 8.5 +.PP +All of the legal \fIaccess\fR values above may have the character +\fBb\fR added as the second or third character in the value to +indicate that the opened channel should be configured with the +\fB-translation binary\fR option, making the channel suitable for +reading or writing of binary data. +.VE 8.5 .PP In the second form, \fIaccess\fR consists of a list of any of the following flags, all of which have the standard POSIX meanings. @@ -78,6 +86,11 @@ Open the file for both reading and writing. \fBAPPEND\fR Set the file pointer to the end of the file prior to each write. .TP 15 +.VS 8.5 +\fBBINARY\fR +Configure the opened channed with the \fB-translation binary\fR option. +.VE 8.5 +.TP 15 \fBCREAT\fR Create the file if it doesn't already exist (without this flag it is an error for the file not to exist). @@ -106,14 +119,6 @@ If a new file is created as part of opening it, \fIpermissions\fR (an integer) is used to set the permissions for the new file in conjunction with the process's file mode creation mask. \fIPermissions\fR defaults to 0666. -.PP -Note that if you are going to be reading or writing binary data from -the channel created by this command, you should use the -\fBfconfigure\fR command to change the \fB-translation\fR option of -the channel to \fBbinary\fR before transferring any binary data. This -is in contrast to the ``b'' character passed as part of the equivalent -of the \fIaccess\fR parameter to some versions of the C library -\fIfopen()\fR function. .SH "COMMAND PIPELINES" .PP |