MIO file source initializers. More...
#include <airframe/mio.h>
Go to the source code of this file.
Data Structures | |
struct | _MIOSourceFileConfig |
File source configuration context. More... | |
Typedefs | |
typedef struct _MIOSourceFileConfig | MIOSourceFileConfig |
File source configuration context. More... | |
Functions | |
gboolean | mio_source_init_file_dir (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
Initialize a file source for reading every file from a specified directory. More... | |
gboolean | mio_source_init_file_glob (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
Initialize a file source for reading every file from a specified glob(3) expression. More... | |
gboolean | mio_source_init_file_single (MIOSource *source, const char *spec, MIOType vsp_type, void *cfg, GError **err) |
Initialize a file source for a single file. More... | |
MIO file source initializers.
Most applications should use the interface in mio_config.h to access these initializers.
typedef struct _MIOSourceFileConfig MIOSourceFileConfig |
File source configuration context.
Pass as the cfg argument to any file source initializer.
gboolean mio_source_init_file_dir | ( | MIOSource * | source, |
const char * | spec, | ||
MIOType | vsp_type, | ||
void * | cfg, | ||
GError ** | err | ||
) |
Initialize a file source for reading every file from a specified directory.
source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
spec | input specifier to initialize MIOSource with. Must be the pathname of an accessible directory. |
vsp_type | requested source pointer type, or MIO_T_ANY for default. |
cfg | pointer to configuration context. Must be a pointer to an MIOSourceFileConfig structure. |
err | An error description pointer. |
gboolean mio_source_init_file_glob | ( | MIOSource * | source, |
const char * | spec, | ||
MIOType | vsp_type, | ||
void * | cfg, | ||
GError ** | err | ||
) |
Initialize a file source for reading every file from a specified glob(3) expression.
Fails over to mio_source_init_file_single() if the specifier contains no glob expression characters.
source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
spec | input specifier to initialize MIOSource with. Must be a glob expression. |
vsp_type | requested source pointer type, or MIO_T_ANY for default. |
cfg | pointer to configuration context. Must be a pointer to an MIOSourceFileConfig structure. |
err | An error description pointer. |
gboolean mio_source_init_file_single | ( | MIOSource * | source, |
const char * | spec, | ||
MIOType | vsp_type, | ||
void * | cfg, | ||
GError ** | err | ||
) |
Initialize a file source for a single file.
Fails over to mio_source_init_stdin() if specifier is the special string "-".
source | pointer to MIOSource to initialize. This MIOSource will be overwritten. |
spec | input specifier to initialize MIOSource with. Must be a filename. |
vsp_type | requested source pointer type, or MIO_T_ANY for default. |
cfg | pointer to configuration context. Must be a pointer to an MIOSourceFileConfig structure. |
err | An error description pointer. |