 |
CCP4i: Graphical User Interface |
Documentation for Programmers |
OpenFile |
NAME
OpenFile - Open a file for read or write
SYNOPSIS
OpenFile filename channel [access]
DESCRIPTION
Open a file filename and return the channel id channel. By default the file is
opened in "a+" mode (open for read and write and create the file if it does not already exist).
The optional argument access has the same valid values as access for the Tcl open
command which are:
- r
- Open the file for reading only; the file must already exist. This is the default value if
access is not specified.
- r+
- Open the file for both reading and writing; the file must already exist.
- w
- Open the file for writing only. Truncate it if it exists. If it doesn't exist, create a new file.
- w+
- Open the file for reading and writing. Truncate it if it exists. If it doesn't exist, create a new file.
- a
- Open the file for writing only. The file must already exist, and the file is positioned so that new data is
appended to the file.
- a+
- 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.
KEYWORDS