Flux Reference Manual |
---|
flux-file-io —
#define FLUX_FILE_IO (object) enum FluxFileIOState; struct FluxFileIO; FluxFileIO* flux_file_io_new (gint fd); void flux_file_io_init (FluxFileIO *file_io, gint fd); void flux_file_io_finalize (FluxObject *file_io); gint flux_file_io_get_fd (FluxFileIO *file_io); guint64 flux_file_io_get_size (FluxFileIO *file_io); guint64 flux_file_io_get_position (FluxFileIO *file_io); void flux_file_io_set_eof_func (FluxFileIO *file_io, FluxEofFunc *func, gpointer data); void flux_file_io_set_eow_func (FluxFileIO *file_io, FluxEowFunc *func, gpointer data); void flux_file_io_seek_to (FluxFileIO *file_io, guint64 position); void flux_file_io_seek_relative (FluxFileIO *file_io, gint64 offset);
typedef enum { FLUX_FILE_IO_IDLE, FLUX_FILE_IO_READING, FLUX_FILE_IO_WRITING } FluxFileIOState;
struct FluxFileIO { FluxIO io; FluxFileIOState state; GIOChannel *gioc; gint fd; guint64 real_position; guint io_watch_id; FluxEofFunc *eof_func; gpointer eof_func_data; FluxEowFunc *eow_func; gpointer eow_func_data; };
guint64 flux_file_io_get_position (FluxFileIO *file_io);
file_io : | |
Returns : | The file position as it would be if all buffers were flushed. This value changes immediately when the user reads or writes data, even if it hasn't been read from/committed to disk. |
void flux_file_io_set_eof_func (FluxFileIO *file_io, FluxEofFunc *func, gpointer data);
file_io : | |
func : | |
data : |
void flux_file_io_set_eow_func (FluxFileIO *file_io, FluxEowFunc *func, gpointer data);
file_io : | |
func : | |
data : |
void flux_file_io_seek_to (FluxFileIO *file_io, guint64 position);
file_io : | |
position : |
void flux_file_io_seek_relative (FluxFileIO *file_io, gint64 offset);
file_io : | |
offset : |
<< flux-io | flux-tcp-io >> |