file channels
Gives the names of the open channels.
file channels ?PATTERN?
Description
Gives the names of the channels of the interpreter, or the names that match the glob PATTERN. The same command is chan names.
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| PATTERN | glob pattern | none | A pattern for the names. |
Returns
A list of channel names.
Examples
% lsort [file channels std*]
stderr stdin stdout
Errors
% file channels a b
wrong # args: should be "file channels ?pattern?"
-errorcode TCL WRONGARGS
Facts
- Capability
file. A new interpreter does not have it until the host turns it on.- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1