Pipe Handles¶
Pipe handles are the entities through which we perform command orchestration pipelines. They are one underlying implementation of handles.
Pipe handles only really differ from file handles in that you cannot seek on a pipe handle.
You can open pipe handles directly and there are command orchestration
meta-commands like pipe-into
and pipe-from
which will return
pipe handles.
Pipe Handle Predicates¶
- function pipe-handle? o¶
test if o is a pipe handle
- Param o:
object to test
- Return:
#t
if o is a pipe handle,#f
otherwise
- function input-pipe-handle? o¶
test if o is an input pipe handle
- Param o:
object to test
- Return:
#t
if o is an input pipe handle,#f
otherwise
- function output-pipe-handle? o¶
test if o is an output pipe handle
- Param o:
object to test
- Return:
#t
if o is an output pipe handle,#f
otherwise
Pipe Handle Constructors¶
- function open-input-pipe fd [name [mode]]¶
construct an input pipe handle from fd using the name name and mode mode
- Param fd:
file descriptor
- Type fd:
C/int
- Param name:
file name for display, defaults to
/dev/fd/fd
- Type name:
string, optional
- Param mode:
file mode for opening, defaults to
"r"
- Type mode:
string, optional
- Return:
pipe file handle
- Rtype:
handle
Use
#n
for name if you only want to set modeSee open-file for mode values.
- function open-output-pipe fd [name [mode]]¶
construct an output pipe handle from fd using the name name and mode mode
- Param fd:
file descriptor
- Type fd:
C/int
- Param name:
file name for display, defaults to
/dev/fd/fd
- Type name:
string, optional
- Param mode:
file mode for opening, defaults to
"w"
- Type mode:
string, optional
- Return:
pipe file handle
- Rtype:
handle
Use
#n
for name if you only want to set modeSee open-file for mode values.
Pipe Handle Attributes¶
- function pipe-handle-fd ph¶
return the file descriptor associated with pipe handle ph
- Param ph:
pipe handle to query
- Type ph:
pipe handle
- Return:
file descriptor
- Rtype:
C/int
Last built at 2025-02-05T07:10:42Z+0000 from 62cca4c (dev) for Idio 0.3.b.6