File input and output commands
These commands include those to search ASCII-sorted data files,
copy files, duplicate file descriptors,
control file access options, retrieve open
file status, and create pipes with the pipe system call.
An interface to the select system call is available on
UNIX systems that support it.
Tcl file I/O is implemented on top of the stdio library.
By default, the file is buffered.
When communicating to a process through a pipe, a flush
command should be issued to force the data out.
Alternatively, the fcntl command may be used to set the buffering
mode of a file to line-buffered or unbuffered.
Available commands are:
bsearch(1tcl)-
searchs an open file for a match
close(1tcl)-
closes an open file
copyfile(1tcl)-
copies the remainder of file1 to file2
dup(1tcl)-
duplicates an open file
eof(1tcl)-
checks for an end-of-file condition on an open file
fblocked(1tcl)-
tests whether the last input operation exhausted all available input
fcntl(1tcl)-
sets, clears, or returns file options
fconfigure(1tcl)-
sets and gets options on a channel
file(1tcl)-
manipulates file names and attributes
filename(1tcl)-
lists the filename conventions supported by Tcl
flock(1tcl)-
creates a lock on all or part of a file
flush(1tcl)-
flushes buffered output for a file
for_file(1tcl)-
implements a loop over contents of a file
funlock(1tcl)-
removes a lock created by
flock(1tcl)
frename(1tcl)-
renames an old path to a new path
fstat(1tcl)-
obtains status information on an open file
gets(1tcl)-
reads a line from a file
lgets(1tcl)-
reads the next Tcl list from a file and discards the terminating newline
open(1tcl)-
opens a file
pipe(1tcl)-
creates a pipe
puts(1tcl)-
writes to a file
read(1tcl)-
reads from a file
read_file(1tcl)-
reads a file and returns its contents as a string
select(1tcl)-
waits for files to come available or satisfy conditions
seek(1tcl)-
changes the access position for an open file
socket(1tcl)-
opens a TCP network connection
tell(1tcl)-
returns the current access position for an open file
write_file(1tcl)-
writes strings to a specified file
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004