Airframe Application Utilities
libairframe 2.12.0 API documentation

Data Structures | Typedefs | Functions
mio_source_file.h File Reference

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...
 

Detailed Description

MIO file source initializers.

Most applications should use the interface in mio_config.h to access these initializers.

Typedef Documentation

◆ MIOSourceFileConfig

File source configuration context.

Pass as the cfg argument to any file source initializer.

Function Documentation

◆ mio_source_init_file_dir()

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.

Parameters
sourcepointer to MIOSource to initialize. This MIOSource will be overwritten.
specinput specifier to initialize MIOSource with. Must be the pathname of an accessible directory.
vsp_typerequested source pointer type, or MIO_T_ANY for default.
cfgpointer to configuration context. Must be a pointer to an MIOSourceFileConfig structure.
errAn error description pointer.
Returns
TRUE if the MIOSource was successfully initialized.

◆ mio_source_init_file_glob()

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.

Parameters
sourcepointer to MIOSource to initialize. This MIOSource will be overwritten.
specinput specifier to initialize MIOSource with. Must be a glob expression.
vsp_typerequested source pointer type, or MIO_T_ANY for default.
cfgpointer to configuration context. Must be a pointer to an MIOSourceFileConfig structure.
errAn error description pointer.
Returns
TRUE if the MIOSource was successfully initialized.

◆ mio_source_init_file_single()

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 "-".

Parameters
sourcepointer to MIOSource to initialize. This MIOSource will be overwritten.
specinput specifier to initialize MIOSource with. Must be a filename.
vsp_typerequested source pointer type, or MIO_T_ANY for default.
cfgpointer to configuration context. Must be a pointer to an MIOSourceFileConfig structure.
errAn error description pointer.
Returns
TRUE if the MIOSource was successfully initialized.