Airframe Application Utilities
libairframe 0.7.2 API documentation

Main Page | Data Structures | File List | Data Fields | Globals

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 _MIOSourceFileConfig MIOSourceFileConfig
 File source configuration context.

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

Detailed Description

MIO file source initializers.

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


Typedef Documentation

typedef struct _MIOSourceFileConfig MIOSourceFileConfig
 

File source configuration context.

Pass as the cfg argument to any file source initializer.


Function Documentation

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:
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.
Returns:
TRUE if the MIOSource was successfully initialized.

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:
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.
Returns:
TRUE if the MIOSource was successfully initialized.

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:
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.
Returns:
TRUE if the MIOSource was successfully initialized.