Next: bpipe_iochannel_open, Previous: bpipe_iochannel_fgetrn, Up: Internal Functions
create and initialize an IOchannel structure
#include <bpipe/bpipe.h>IOchannel *bpipe_iochannel_new(char *path);
char *path
- a path to the file or device to use as the I/O channel
This routine allocates an IOchannel
structure, making a copy of the
passed path to the file or device to use as the I/O channel. It
does not open the I/O channel.
It returns a pointer to a dynamically allocated IOchannel
structure. It returns NULL
if path
is empty or
NULL
, or if it couldn't allocate memory for the structure..
Upon error bpipe_errno
is set and NULL
is returned.
Upon error bpipe_errno
is set to one of the following errors:
BPENOMEM